编译选项
你可以通过 compilerOptions 来定制你的编译选项:
{
"compilerOptions": {
/* 基本选项 */
"target": "es5",...// 指定 ECMAScript 目标版本: 'ES3' (default), 'ES5', 'ES6'/'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'
"module...": true, // 启用严格的 null 检查
"noImplicitThis": true, // 当 this 表达式值为 any..., // 有未使用的参数时,抛出错误
"noImplicitReturns": true, // 并不是所有函数里的代码都有返回值时,抛出错误.../tsconfig",
"compilerOptions": {
"strictNullChecks": false
}
}