I've been trying to create a hello-world sample with TypeScript (1.5 beta) and AngularJS (1.4) using Visual Studio Code (0.3.0) editor. As shown in the snapshot below, when the code references AngularJS' TypeScript definition file, VS Code throws a lot of errors.
Not sure what wrong I am doing here.
** Edit **
The typings are installed by first running npm install -g typescript
and then tsd install [library-name] --save
Considering the comments from GJSmith3rd, building the project outputs the --help command of tsc. See below:
Typescript in VSCode is working fine with your example.
Create a new folder in VSCode
Create a simple tsconfig.json file with compiler options
Create example code to in app.ts
IMPORTANT: Use DefinitelyTyped
tsd
command$tsd install angular jquery --save
from DefinitelyTyped. Angular depends on jQuery.Add a
tsd.d.ts
file reference toapp.ts
Configure a Task Runner in
.settings/tasks.json
in directory of the app by using shift+ctl+b and select "Configure Task Runner". Remove the contents of"args:[Hello World],
or create a new similar task with"args:[],
Compile with Task Runner with shift+ctl+b
Here's the uncommented task runner I used
"args": [],
If there are still problems with compiling in VSCode try the command line from the project directory for clues.
and check your version as mentioned earlier:
02:00:23 ツ gjsmith3rd@DV7:~/Workspaces/Examples/TypeScript/MSDN/MyProject5 >tsc --version message TS6029: Version 1.5.3
Consider updating tsc to the latest version which at the time of this edit is v1.5.3 with
sudo npm install tsc -g
.