CleanCrispCode CleanCrispCode - 3 months ago 18
TypeScript Question

module property in tsconfig.json

As per my understanding we can assign value "commonjs" or "AMD"
to "module" property in tsconfig.json.

Can we assign any other value other than these two.

....
....
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
}
}
....
....

Answer

Yes we can, allowed values are:

"commonjs", "amd", "umd", "system", "es6", "es2015", "none".

Directly from json schema

Or in more readable format see --module in compiler options