I have version 0.9.1.1. So I ran the following:
C:\test>npm install -g typescript
npm http GET https://registry.npmjs.org/typescript
npm http 200 https://registry.npmjs.org/typescript
npm http GET https://registry.npmjs.org/typescript/-/typescript-1.0.0.tgz
npm http 200 https://registry.npmjs.org/typescript/-/typescript-1.0.0.tgz
C:\Users\david\AppData\Roaming\npm\tsc -> C:\Users\david\AppData\Roaming\npm\nod
e_modules\typescript\bin\tsc
[email protected] C:\Users\david\AppData\Roaming\npm\node_modules\typescript
But when I run tsc I get:
C:\test>tsc
Version 0.9.1.1
Syntax: tsc [options] [file ..]
What else do I need to do to install the latest version?
Update:
C:\test>where tsc
C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.js
C:\Users\david\AppData\Roaming\npm\tsc
C:\Users\david\AppData\Roaming\npm\tsc.cmd
tsc.exe is 0.9.1.1 and tsc.cmd is 1.0.0.0
I then removed the VisualStudio 0.9.1.1 AddIn and it's now all good - just tsc.cmd and that's 1.0.0.0
Thank you all!
You can use npm to install TypeScript globally, this means that you can use the tsc command anywhere in your terminal. To do this, run npm install -g typescript . This will install the latest version (currently 4.8).
You will need to install the TypeScript compiler either globally or in your workspace to transpile TypeScript source code to JavaScript ( tsc HelloWorld. ts ). You can test your install by checking the version or help.
Test that the TypeScript is installed correctly by typing tsc -v into your terminal or command prompt. You should see the TypeScript version print out to the screen. For help on possible arguments you can type tsc -h or just tsc .
NPM (Node. js package manager) is used to install the TypeScript package on your local machine or a project.
What else do I need to do to install the latest version?
It is because you probably (almost definitely) have TypeScript plugin for visual studio installed. You can uninstall that from Control Panel. Then the typescript you installed from npm will be the default one on the command line.
Alternatively you can get the latest TypeScript from Visual Studio 2012 plugin from here : http://www.typescriptlang.org/#Download (For VS 2013 it is bundled as a part of VS 2013 update 2 RC)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With