TypeScript extends JavaScript by adding types.
TypeScript speeds up your development experience by catching errors and providing fixes before you even run your code.
Any browser, any OS, anywhere JavaScript runs. Entirely Open Source.
- Summary of TypeScript changes
- Two or Three 10–20 minute talks: Beginner, Intermediate, Advanced
- Q&As after each talk
Please use #tsnyc on Twitter, Instagram, etc.
We follow the JSConf Code of Conduct
- Import type
- Private Fields
- Top Level Await
- JSDoc Improvements
- Watch Options
// Look at the JS, this isn't included in the output import {DangerDSLType} from "danger"Tools like Babel, which don’t type-check can be certain with 100% accuracy whether to remove the import.
declare const myDSL: DangerDSLType
myDSL.bitbucket_cloud
// On the other hand, this one is... import {danger} from "danger" danger.git
// But why?
// TS keeps track of whether an import is a "JS" value // or a TypeScript type. import {DangerDSLJSONType, message} from "danger" message
// Babel cannot do this!
// So now Babel knows that it can always skip these // 'import type' statements import type {DangerUtilsDSL} from "danger"
// Because they can't be used with "JS" values: import type {markdown} from "danger"
There are folks who want to rely on importing side-effects, but also import a type from that import
// This statement will get erased because of import elision.
import { SomeTypeFoo, SomeOtherTypeBar } from "./module-with-side-effects";
// This statement always sticks around.
import "./module-with-side-effects";