Languages
TypeScript
IntelliSense, navigation, and refactoring for TypeScript, from the TypeScript language service that ships with Gyaanmitra.
What you get when you open a file
Open a .ts or .tsx file and Gyaanmitra's built-in TypeScript support is
on. You get completions, hover info, go-to-definition, find references,
rename, and quick fixes. You do not install an extra extension for that.
Choosing a TypeScript version
By default Gyaanmitra uses the TypeScript version bundled with the editor. To use the compiler that belongs to the project:
- Install TypeScript in the workspace (
npm install typescript --save-dev). - Run TypeScript: Select TypeScript Version… from the Command Palette.
- Pick the workspace version under
node_modules/typescript/lib.
You can also point settings at a folder with js/ts.tsdk.path (or the
legacy typescript.tsdk setting) so everyone who opens the workspace uses
the same compiler.
Compiling and watching
Use a task for tsc or your package
script (npm run build). Pair it with the $tsc problem matcher so
compiler errors show up in the Problems panel as places you can click.
Prefer the workspace TypeScript
Match the editor's language service to the TypeScript version your
tsconfig.json expects. That keeps the editor and CI on the same compiler.