TypeScript 0.9 Preview Release
Over the past few years, we’ve seen JavaScript applications for the web, on the server, and on Windows become much more substantial in size. To address this trend, last October we released the initial version of TypeScript, which enables application-scale JavaScript, providing high-fidelity interaction with existing JavaScript libraries, and giving developers the direct power and flexibility of JavaScript from a language that supports advanced tooling and error detection.
Today, I am happy to announce a major milestone in the evolution of TypeScript, with the 0.9 release. Along with important new language features and improved tooling capabilities in Visual Studio, we’ve done considerable work to scale the TypeScript language service for large application development, giving developers a smooth, interactive experience regardless of project size.
TypeScript has already been positively impacting web development, even as an early technical preview. Inside Microsoft, teams in Bing, Team Foundation Server, So.cl, CodePlex, and elsewhere are using TypeScript in production applications, some in excess of 200k lines, leveraging TypeScript’s ability to scale quickly with the assurances provided by a type system and rich IDE support. In the broader JavaScript community, projects like Turbulenz and Starling.js have leveraged TypeScript as part of new development libraries and kits. We’re also seeing teams building enterprise and consumer applications for the web, Windows Store, and server -- all with TypeScript.
A key piece of this growing TypeScript ecosystem is its development as an open source project on CodePlex. Hundreds of developers are engaging with the project across the forums, issue tracker, and source code forks. As a result of its openness, more than a dozen editors now support TypeScript, enabling development with TypeScript in a variety of popular tools, and across multiple major platforms. Additionally, integration with popular build systems, a diverse collection of library typings at DefinitelyTyped, test tools, and application models are available thanks to the TypeScript developer ecosystem. Largely in part of the efforts of the community, we’re honored to have been recognized as a 2012 Open Source Rookie of the Year for the TypeScript project.
These community efforts have been instrumental to guiding the 0.9 release. Notably with 0.9, we introduce generics, the most publically-requested feature. Generics take advantage of the strong type inference that TypeScript already provides, allowing users to have better static error reporting and richer tooling, in many cases without any additional type annotations.
Imprecise typing of the 0.8 release: |
Improved, precise typing of the new 0.9 release: |
In the above example, we can see the contrast between what was possible with the 0.8 and the new 0.9 languages. Prior to this release, the lengthOfSecond variable would have the type ‘any’ because the language could not precisely describe how the map method passed type information from the array to its output. Now, with generics, the 0.9 compiler can correctly traffic this type information to the output, giving lengthOfSecond the correct type of ‘number’. We’ve incorporated this improved type information in the typing of the JavaScript API, the HTML DOM, and code samples so that developers can begin leveraging these improvements immediately after upgrading.
In addition to generics, the language service has been completely rewritten for much-improved interactive performance. Building web and Windows Store applications should now feel more responsive for IntelliSense, code navigation, and refactoring, especially as projects grow in size.
As we drive towards TypeScript 1.0, we’re focused on making it a flexible, fast, and powerful tool shaped by community feedback on real-world problems, and we’re excited to continue working with the community that grows around it.
For more information on the TypeScript 0.9 release, see the TypeScript team blog. You can download the release now from https://www.typescriptlang.org/#Download.
Namaste!
Follow me on Twitter at https://twitter.com/ssomasegar.
Comments
Anonymous
June 18, 2013
The marvel of XAML in TypeScript !! Search the Web for "M&P H5J is Silverlight in HTML5"Anonymous
June 19, 2013
200K Lines of code for an app, as you indicated in your blog, is an embarrassment and is directly linked to the sub standard application development tools and total lack of rapid application development capabilities of Visual Studio. Your inability to manage this product is undeniable. The never ending bug list, incomplete features and lack of direction screams incompetence. It would behoove the entire development community if you would resign and along with the rest of the Visual Studio product team. Microsoft needs to bring in a core group of managers and programmers who fully understand modern day programming and business challenges; People who are capable of delivering solutions to meets today's needs instead of releasing slow buggy products that force developers into the stone age of application development which is what has occurred under your watch,Anonymous
June 23, 2013
Outstanding new feature, I am sure it is going to have people running to start using Visual Studio. Not !Anonymous
June 23, 2013
Typescript seems to be heading in the right direction. I feel more and more comfortable importing my C# skills and getting my hands dirty with TS. Love the use of generics for type safety, good innovative thoughts. @Greg, why all the negativity ? I use VS 2010 everyday at work. And having used Eclipse, CodeBlocks and other IDE's, VS is leaps ahead in terms of productivity, ease of use and learning curve.