Announcing TypeScript 0.8.2

Announcing TypeScript 0.8.2

Rate This
  • Comments 23

We’re happy to announce the 0.8.2 preview release of TypeScript.  This release has been focused on  addressing key usability feedback and filling in tooling experiences.  Along the way, we’ve also incorporated some of the highest-rated feature requests and bugfixes.

JSDoc Support

Being able to see API documentation comments during Intellisense and parameter help has been a highly requested feature.  In fact, it’s currently the 2nd most-requested feature in the issue tracker.

With 0.8.2, the TypeScript compiler and tools now support JSDoc comments.

In the TypeScript implementation, because types are already part of the system, we allow the JSDoc type annotation to be elided, as in the example above.

You can now document a variety of language constructs (including classes, modules, interfaces, and functions) with comments that become part of the information displayed to the user.  We’ve also started extending lib.d.ts, the default JS and DOM API library, with JSDoc comments.

This capability is also part of the language service, so cross-platform tools can take advantage of it.

Compile-on-Save

Many of the themes in this release center around simplifying workflow.  We’ve focused on a few key areas with the aim of streamlining developing in TypeScript.

Languages like TypeScript which compile to JavaScript add a build step into the development cycle.  Enabling a compile-on-save mode of use minimizes this overhead by automatically updating the compiled JS when the TypeScript source changes.  With 0.8.2, we’ve done work to further enable this in both the NPM-based compiler and in Visual Studio.

The 0.8.2 release adds initial support for compile-on-save in Visual Studio.  Just as the name implies, when enabled the project or file being edited will be compiled when the changes are saved.  For more information, please see the wiki page for compile-on-save.

 

TypeScript supports compile-on-save on the command line using the cross-platform NPM-based TypeScript compiler as well with the improved --watch compiler option.  This option allows a compile to begin watching a set of files.  Once a watched file is changed, the compiler rebuilds the corresponding output for that file.

Various Improvements

  • We’ve further improved the Visual Studio TypeScript debugging experience in 0.8.2.  The debugger will now honor breakpoints after F5 (refresh) during a debug session.  Combined with the addition of compile-on-save, the workflow to edit and debug a web app is as easy as saving the edited changes and refreshing the browser.
  • It’s possible now to specify output directory when compiling external modules.  This gives a cleaner way to build external modules without having the output in-tree.
  • The compiler service can now be replaced in the TypeScript for Visual Studio 2012 plugin.  This makes it easier to leverage the Visual Studio TypeScript extension with newer compiler builds from CodePlex or from experimental forks.
  • We’ve moved to Jake for building the compiler and language service.  Jake is a simpler solution which should make it easier to work with and build the compiler in a multiplatform-friendly way.
Leave a Comment
  • Please add 7 and 2 and type the answer here:
  • Post
  • Awesome a new release! I would suggest to put a link to this blog post in the release notes at Codeplex. Because from those notes it's not clear what has changed.

  • Awesome, looking forward to playing with it.

    One question. The WebEssentials plugin also has a "compile on save" feature. Should we leave that turned on, or turn it off, now that the language service itself has "compile on save"?

  • Excellent, great timing.

    The only other feature I could wish for would be generics and that is coming in the next release.

    Keep up the good work and thanks.

  • This is just what I needed, built in compile on save and edit/ refresh debugging!!!

    Thanks so much guys!!!!

  • Glad you guys added the JSDoc support.  It's still missing in a key area though- object properties. I hope you can come up with a smooth syntax for applying JSDoc to the constructor shorthand syntax of declaring properties as well.

  • I think "elided" actually means the opposite of how it was used here.

  • Cool, thank you!

    Compile on save already worked with WebEssentails.

    I hope, next release will include 1st most requested feature - Generics!

    When do you plan next release?

  • @Ken Smith and Igorbek

    The compile-on-save support released in this version targets multi-platform compile-on-save.  On the VS side, we have a new TypeScript targets file that should definitely help simplify upgrading projects between versions going forward.  To my knowledge, WebEssentials isn't currently using this (though it may in the future).  We also improved the --watch commandline option for invoking the compiler from the commandline to do a similar compile-on-save.  

    @Sam

    We support documenting the parameters of constructors that are shorthand for declaring properties, using an alternate syntax:

    constructor (/** This is my main element */ public element: HTMLElement) { ... }

  • PLEASE, ADD SUPPORT FOR VB !!!

  • Great, it is better and better each day. What I would like to have now it is simplifying the module/import/refrence/... the compiler should find itself where are the  files into directories we pointed out, and avoid the ///ref declaration... For the module, we already have the Class notion which makes well the stuff... It misses the assembly notion, where every files with the same assembly ref would produce a assembly .js file.

    I've just tried to update an existing typscript project by modifying as indicated the c# project file... From now, when I make a build on the project, VS tells me :

    >------ Build started: Project: TypeScriptHTMLApp2, Configuration: Debug Any CPU ------

    1>  Version 0.8.2.0

    1>  Syntax:   tsc [options] [file ..]

    1>  

    1>  Examples: tsc hello.ts

    1>            tsc --out foo.js foo.ts

    1>            tsc @args.txt

    1>  

    1>  Options:

    1>    -c, --comments        Emit comments to output

    1>    --declaration         Generates corresponding .d.ts file

    1>    -e, --exec            Execute the script after compilation

    1>    -h, --help            Print this message

    1>    --module KIND         Specify module code generation: "commonjs" (default) or "amd"

    1>    --nolib               Do not include a default lib.d.ts with global declarations

    1>    --out FILE|DIRECTORY  Concatenate and emit output to single file | Redirect output structure to the directory

    1>    --sourcemap           Generates corresponding .map file

    1>    --target VER          Specify ECMAScript target version: "ES3" (default), or "ES5"

    1>    -v, --version         Print the compiler's version: 0.8.2.0

    1>    @<file>               Insert command line options and files from a file.

    1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\TypeScript\Microsoft.TypeScript.targets(38,5): error MSB3073: The command "tsc  --comments --sourcemap --target ES5 " exited with code 1.

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  • @Xavier - Looks like no source files were passed to the compiler.  The wiki page linked in the blog has been updated with some additional details that might help.  Feel free to follow up with questions on the discussion list on typescript.codeplex.com or on stackoverflow.com/tags/typescript.

  • Is there a way to get Visual Studio to create a jsdoc block with all the parameters in it, or do you have to do it manually?

  • @Stuart - currently, you have to do that manually.  You could add a feature request for that on the issue tracker (typescript.codeplex.com/.../basic).  

  • The watch functionality on npm version is utterly useless! It generates a DIFF markup. Why?

  • @Albert - which platform are you seeing the issue with --watch?  Also, if you can, it'd be helpful to see an example of the command-line that you're using.  

Page 1 of 2 (23 items) 12