The focus on ECMAScript features moves TypeScript toward the goal of becoming a superset of ES6 and offering type-checking for the specification's major features, said Microsoft's Jonathan Turner, senior program manager, in an MSDN blog post. "With this release, we've begun supporting the official ES6 modules, we're simplifying how modules work, and we're adding support for more kinds of modules as output."
ES6 modules are separately loaded source files that possibly import other modules as well as provide externally accessible exports, Microsoft explains on GitHub. "ES6 module syntax offers a rich way of working with modules," Turner said. " Similar to external modules in TypeScript, ES6 modules can import modules and exports each piece of your public API. Additionally, ES6 modules allow you to selectively import the parts of that public API you want to use."
To make it easier to start using TypeScript, the compiler supports a tsconfig.json file allowing users to specify files in a project and the compiler settings. "This lets you create a lightweight project that can be used both on the command line and within the editor," said Turner.
The road map for TypeScript calls for such capabilities as ES6 Generators, which provide a syntactic way to declare a function that can yield, in TypeScript 1.6. For version 2.0, module bundling and improving lib.d.ts modularity are on the drawing board.
This story, "Microsoft's TypeScript 1.5 aligns with ECMAScript" was originally published by InfoWorld.