Question

Any ideas how could I try out the generics feature (located in dev-0.9.x branch )

a) in Visual Studio 2012 with the TypeScript plugin

b) or at least in the command prompt?

I followed the how to build steps (involving Jake) so I have an up to date version.

However I tried the a post by Microsoft but for the following code

class MyClass<T> {

}

Visual Studio 2012 reports that an { is expected (clearly unaware of the new language feature })

If I try to compile from the command prompt I get the same error.. What do I miss?

Was it helpful?

Solution

The 0.9 code is introducing quite a few changes, and as such it is not drop-in compatible with the Visual Studio plug-in as per the blog post (i.e. you can't just replace typescriptServices.js and it will work).

Until a 0.9 drop is released with an MSI that installs the updated VS plug-in also, it will only be usable from the command-line.

The command-line should work however, if you build, and then run the tsc.js script. Can you provide more details on your steps and what you are seeing? This is changing rather rapidly at the moment as work progresses, so make sure you have the very latest bits pulled so I can verify.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top