I am quite new to Typescript.
What does Target in tsconfig.json signify?
{
"compilerOptions":
{
"sourceMap": true,
"target": "es5",
"module": "commonjs",
"jsx": "react",
"moduleResolution": "classic",
"lib": [ "es2015", "dom", "es2017" ]
}
}
I am quite new to Typescript. What does Target in tsconfig.json signify?
target
signifies which target of JavaScript should be emitted from the given TypeScript. Examples:
target:es5
()=>null
will become function(){return null}
as ES5 doesn't have arrow functions.
target:es6
()=>null
will become ()=>null
as ES6 has arrow functions.