- Great tools enabled by static types
Use all the latest features of ECMAScript. A lot of features are not available in the wild. There is a gap between the state of the art JS and the state of the web JS. You need something to fill the gap. TypeScript allows you to use most of the features of ECMAScript 6 and down-level it to ECMAScript 3 for example. The gap continues to be there and you need tools like TypeScript to close the gap.
Visual Studio Code used for the entire session.
In the last year 4 versions released from 1.5 to 1.8. Roadmap on GitHub.
Features implemented in the last year
Partnership with Google using TypeScript to write the next version of Angular, Angular 2.
- Navigate around by going to declaration. Similar experience like with C# or Java.
- Statement completion. IDE serves them up and validates them for you.
- SystemJS module loader is great for development. Edit-Save-Refresh the browser.
React from Facebook, open source UI framework, also using TypeScript.
- Based on JSX, write markup inside your program, allows you to write new attributes.
- Go to definition on markup components.
- Refactoring on JSX markup across large projects and have it type-safe.
- Using Webpack with ts-loader to bundle all the code together.
- Statement completion on the markup.
- async await capability.
- Visual Studio Code has Node debugging support.
- Debugging and hitting breakpoint within the Node server.
- JSD annotation used for statement completion.
- Statement completion for jQuery
- tsc -install
- tsd install jQuery
- allowJS: true in tsconfig.js
- tsd install loadash
Features coming in the future
Next on the roadmap TypeScript 2, probably out in late May or in June.
- Non-nullable types
- Union types supported today: number | string.
- Strict null checks will be introduced with TypeScript 2: undefined and null no longer available in types. Extracting in new types undefined and null. Can be used as union types, e.g. string | null | undefined.
- New feature: definite assignment analysis to check that a value is assigned in all branches.
- Backwards compatible.
More new features: