Announcing TypeScript 0.8.1

Luke Hoban [MS]

Announcing TypeScript 0.8.1

We released the first public preview of TypeScript last month, and have been excited to see the great reaction from the developer community.  Since the preview, we’ve seen an influx of suggestions and bug reports, integration into various build and testing tools, and declare files for a variety of existing JavaScript libraries

Today, we’re happy to announce the second publically available preview of TypeScript: version 0.8.1.  This preview focuses on addressing critical bugs and adding one of the most requested features: source level debugging.

Debugging

TypeScript now supports source level debugging!  The source map format has been gaining popularity as a way of debugging languages which translate to JavaScript and is supported by a variety of browsers and tools.  With version 0.8.1, the TypeScript compiler officially supports source maps.  Additionally, the new version of TypeScript for Visual Studio 2012 supports debugging using the source map format.

From the command-line, we now fully support the use of the –sourcemap flag, which outputs a source map file corresponding to the JavaScript output.  This file will allow directly debugging the original TypeScript source in source map-enabled browsers and Visual Studio.

To enable debugging in Visual Studio select ‘Debug’ from the dropdown after creating an HTML Application with TypeScript project.

Once selected, you can set breakpoints and step directly in your TypeScript code.

  

You can also see your current location using the call stack.  

 

Bug Fixes

This release addresses many issues found in our first public preview.  These fixes have improved compiler stability, compiler correctness, and UTF-8 support.  A big “thank you!” to everyone who has helped so far by reporting bugs and participating in the issue tracker and forums.  

Breaking Changes

There are two known breaking changes since v0.8.0: 

  • Projects created from the Visual Studio templates using v0.8.0 will need to be manually updated to work with v0.8.1.  Going forward, this should not be necessary.  This post contains details of the MSBuild to use when converting projects. 
  • The compiler was previously incorrectly allowing non-exported interfaces in a module to be used from outside the module.  These must now be exported explicitly per the specification.

Conclusion

The version 0.8.1 preview is now available for Visual Studio, npm, and source.  We’re excited to see how people will continue using, building upon, and integrating TypeScript into their JavaScript development, and we’d love to get your feedback.

 

0 comments

Discussion is closed.

Feedback usabilla icon