Before you start
Open the Settings/Preferences dialog Ctrl+Alt+S, go to , and make sure the TypeScript Language Service checkbox is selected.
Create a tsconfig.json file
By default, the built-in compiler does not create source maps that will let you step through your TypeScript code during a debugging session. The compiler also by default processes either the currently opened TypeScript file or all TypeScript files from the scope selected in the Compile Scope field on the TypeScript page as described in TypeScript Language Service.
With a tsconfig.json file, you can modify this default behavior to generate source maps and compile only files from a custom scope.
In the Project tool window, select the folder where your TypeScript code is (most often it is the project root folder) and then select from the context menu.
To generate source maps during compilation, make sure the
sourceMapproperty is set to
To override the default compilation scope, add the
filesproperty and type the names of files to process in the following format:"files" : ["<file1.ts>","<file2.ts>"],
Compile TypeScript code
To compile the TypeScript code of the entire application, in the TypeScript tool window, click and then select Compile All from the list.
To compile one file, open it in the editor, click and then select the path to the file from the list.
To compile a file automatically every time it is changed, open the Settings/Preferences dialog Ctrl+Alt+S, go to , and select the Recompile on changes checkbox.
To compile files from a custom scope, make sure they are listed in the
filesproperty of your tsconfig.json as described above. In the TypeScript tool window, click and select the path to tsconfig.json.