Today we’re excited to roll out our beta release of TypeScript 2.0. This release includes plenty of new features, such as our new workflow for getting .d.ts files.
Here are some of its features,
- Control flow analysis has been started in this release to understand what a type has to be at a given location.
- It now allows wildcards in module declarations.
- Import any path that starts with foo/ and TypeScript will assume that it exists in the new release. If your module loader understands how to import based on a certain patterns, you can benefit from it.
- TypeScript will now know that the import should be typed as a string, if you import a path ending with !text,.
- Implements support for tagged (or discriminated) union types.
- The new release introduces a new primitive type never. The new type represents the type of values that never occur.
- Use a shorthand declaration for quick start up, if you don’t have time to write out declarations before using a new module.
- Support the use of the wildcard character (*) to declare a “family” of module names. Through this, a declaration is only required once for an extension, and not for every resource.
- Two new flags has been introduced to help maintain a clean code base i.e. noUnusedParametersflags and noUnusedLocals.
- Trailing comma in function parameter and argument lists are now allowed.
He also stated,
TypeScript 2.0 is still packed with many useful new features, and we’ll be coming out with more details as time goes on. In the coming weeks, a more stable release candidate will be coming out, with the final product landing not too far after.
Download TypeScript 2.0 Beta for Visual Studio 2015 now!
Editorial Staff at Generic Whiz.