July 2018
Intermediate to advanced
420 pages
8h 46m
English
Some text editors, such as VS Code, give us the ability to deal with TS files as independent units, called File Scope. Although this is very useful for isolated files (as in the following examples), it is recommended that you always create a TypeScript project. You can then modularize your code and use dependency injection between files in the future.
A TypeScript project is created with a file called tsconfig.json, placed at the root of a directory. You will need to indicate to the compiler which files are part of the project, the compile options, and many other settings. A basic tsconfig.json file contains the following code:
{ "compilerOptions": { "target": "es5", "module": "commonjs" }}
Although the preceding ...
Read now
Unlock full access