Trying the Latest TypeScript Build

Trying the Latest TypeScript Build

Rate This
  • Comments 12

Starting with release 0.8.2.0, you can now update the TypeScript language services file, the compiled JavaScript that powers most of the TypeScript editor features in Visual Studio. This includes tasks like error reporting, compile-on-save, renaming, go to definition, completion lists, signature help, and others.

By updating your TypeScript language services file, you can try out the latest features we're working on before they appear in an official release. Naturally, you might encounter bugs here as the code built in the development branches isn't as stable or well-tested as the released version.

The majority of the TypeScript editor features are found in a file called typescriptSerivces.js. To update your file, you'll need to get a new copy and overwrite the existing copy.

Obtaining a new 'typescriptServices.js' file

Option 1: Use the LKG

The LKG ("Last Known Good") version of the compiler is updated somewhat frequently. You can get a copy from CodePlex using the source browser and downloading the typescriptServices.js file from the bin directory.

Option 2: Build Locally

Install git and Node.js

You'll need some basic tools first

  • Install git. Some recommendations for the install options:
    • Don't install the Windows Explorer integration unless you plan to use it
    • Select the Run Git from the Windows Command Prompt option on the following page
    • Select Checkout as-is, commit as-is option on the following page to minimize any line-ending weirdness
  • Install Node.js

Setup a Local Repository

 > git clone https://git01.codeplex.com/typescript 

This will set up a TypeScript repository in a subfolder of the current folder called 'typescript'.

Select a Branch

 > cd typescript > git checkout develop 

If you're interested in the latest, the develop branch is probably your best bet. There may be other branches with active development; if you know of a branch you'd like to try out instead, replace develop with that branch name.

Get the Development Dependencies

 > npm install 

This will install a local copy of jake, the build system we use for TypeScript.

Build TypeScript

 > .\node_modules\.bin\jake local 

This will produce built\local\typescriptServices.js. Copy that file as indicated below.

Iterate

If you like, you can simply delete the TypeScript folder created in the first step and be done. However, if you come back at a later time and want a new fresh copy (with the latest changes), you'll need to run git pull to get the newest sources. After that, just run jake local and copy over the typeScriptServices.js file again.

Updating TypescriptServices.js

You'll need to locate the folder where the TypeScript extension was installed. Look for a file called typescriptServices.js in a folder like:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\enn4wcm5.z2b\

The highlighted portion at the end there will be different on every machine, but there shouldn't be too many of them in the Extensions folder. In some rare cases, you might have more than one subfolder that has a TypeScript installation in it; if this is the case, you'll want to use the newest one (check the Created date).

When you find the one with typescriptServices.js, backup that file and copy in the new version. After you restart Visual Studio, you'll be working with the updated services file.

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
  • I have downloaded 0.9.x typescriptServices.js, and here are some annotations about generics. Do this version support generics, and can you provide updated syntax with generics ?

    Hope to see new release version with generics support, as soon as possible.

  • Oh Man, Generics is the only thing that holds me back from using typescript, at the moment.

  • Is there an easy way to find out what features are in the LKG builds?

  • @Mark - the easiest way is to follow the check-ins to the 'develop' branch.  The check-in messages should give some sense for what features are being added.

    Of course, LKG is still experimental, so features may go in before they're fully baked, and may also come out again before a release if they need to be rethought.  

  • For those of you using "VS Express for Web", this file can be found in the VWDExpressExtensions folder, not the regular Extensions folder

  • Checkout as-is, commit as-is option in git means `git config core.autocrlf false`

    This is not a recommended settings for a cross platform project as it will cause a mixture of linux/windows style line endings in the files. I'm not sure why you have chosen this but I highly recommend normalizing all line endings and do as github recommends.

    See: help.github.com/.../dealing-with-line-endings

    and timclem.wordpress.com/.../mind-the-end-of-your-line

    Thanks!

  • @Omid - I believe the reason we preserve the line endings is for some of the unit tests, which check against CR and CRLF separately.  If the flag was enabled, we would have to work around git changing our unit tests.

  • Hey guys, awesome idea how to solve this pickle we are in with JS. I'm quite interested in an idea of having automatic conversion of AS3 into TS. What do you think about that? since TS compiler is open-source and written in TS, could it be extended with a different parser etc.. in order to compile from AS3 into TS? Main motivation for this is Adobe Air is still the best of solutions to use for cross-platform mobile and having a same piece of code on a wide web audience and a mobile app would be really cool. What do you guys think? Best of luck in future progress. Can't wait for a new version.

  • doesn't work with 0.9 anymore

  • @d - if you get the alpha we released this week, this should work again.  Some info here:

    blogs.msdn.com/.../announcing-0-9-early-previews.aspx

    If it doesn't, let us know.  

  • The folder location for TypeScript 0.9 is different. Its "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript"

    www.basarat.com/.../trying-latest-version-of-typescript-for.html

  • 0.9 folders:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VWDExpressExtensions\TypeScript

Page 1 of 1 (12 items)