If you only have TypeScript installed for Visual Studio then:
- Start the Visual Studio Command Prompt
- Type
tsc -vand hit Enter
Visual Studio 2017 versions 15.3 and above bind the TypeScript version to individual projects, as this answer points out:
Answer from basarat on Stack Overflow
- Right click on the project node in Solution Explorer
- Click Properties
- Go to the TypeScript Build tab
If you only have TypeScript installed for Visual Studio then:
- Start the Visual Studio Command Prompt
- Type
tsc -vand hit Enter
Visual Studio 2017 versions 15.3 and above bind the TypeScript version to individual projects, as this answer points out:
- Right click on the project node in Solution Explorer
- Click Properties
- Go to the TypeScript Build tab
Two years after the question was asked, using Visual Studio Command Prompt still did not produce right answer for me. But the usual Help|About window seems working these days:
UPDATE (June 2017):
VS 2013 does NOT show this info. (Later note: VS 2017 Enterprise edition does not show this info either).
VS uses Microsoft Build Engine (MSBuild) to compile Typescript files. MSBuild can support several major releases of Typescript, but About window shows only the latest one.
Here is how to get to the bottom of it:
A. To check which versions of Typescript are installed with your Visual Studio/MSBuild, inspect contents of C:\Program Files (x86)\Microsoft SDKs\TypeScript folder. For example, I have versions 1.0, 1.8 and 2.2:
B. Check which version of Typescript is requested by your project. In *.csproj file, look for <TypeScriptToolsVersion> tag, or you can add it if it is missing, like this
<PropertyGroup>
...
<TypeScriptToolsVersion>1.8</TypeScriptToolsVersion>
...
</PropertyGroup>
C. Finally, you can check, which version of Typescript is actually used by MSBuild. In TOOLS | Options | Projects and Solutions | Build and Run set MSBuild project output verbosity to Detailed:
Then build your project and inspect the output: you should see the reference to one of Typescript folders described in (A).
» npm install typescript
ts-node - how do I know what version of tsc it is actually using?
Is ts-node installed globally along with an older version of Typescript?
More on reddit.comHow to check that an 'unknown' object has a specific key and that the key is a specific type?
Videos
Hi all... so I am currently in the midst of upgrading an existing project to a newer version of typescript. The issue I am having is that in package.json we have a command to compile everything with tsc:
"test:build": "tsc --outDir ./dist"
and a command to run the project locally through nodemon and ts-node:
"build:live": "nodemon --exec node --inspect -r ts-node/register ./index.ts | bunyan -l debug",
The issue is that the first command that builds directly with tsc gives compilation errors where our code is not correct for the new version of typescript that I've specified in package.json. That's to be expected and its fine. But the latter command that runs with nodemon and ts-node continues to run quite happily with no errors, which leads me to believe that, behind the scenes, its using a different and older version of tsc.
So, how can I determine which version of tsc is actually being used by ts-node? And more to the point, how can I get it to use the new version that I am trying to target?
Thanks in advance for any help, and sorry if this is a bad question but I am relatively new to the world of node and not having any luck Googling for this.
Is ts-node installed globally along with an older version of Typescript?
When running tsc, it will compile all your source files listed in tsconfig.json. However, when using ts-node/register, it will only error at runtime when attempting to load the require()'d modules.
If you are getting errors on tsc in test:build, try changing the entry point from ./index.ts in build:live to one of the sources that is giving errors. Does it also fail then?