This file is used to give the options about TypeScript used for the Angular JS project.
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
}
}
Following are some key points to note about the above code.
The target for the compilation is es5 and that is because most browsers can only understand ES5 typescript.
The sourceMap option is used to generate Map files, which are useful when debugging. Hence, during development it is good to keep this option as true.
The "emitDecoratorMetadata": true and "experimentalDecorators": true is required for Angular JS decorators. If not in place, Angular JS application will not compile.