- noImplicitAny,开启 any参数的自动映射,不需要显式的指明 any
- 例如:onClick: (e: any) => {}
- 是个小技巧,不是 ts的标准
{ "compilerOptions": { "noImplicitAny": false, // 开启 any参数的自动映射 "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react", "plugins": [ { "name": "typescript-plugin-css-modules" } ] }, "include": [ "src" ]}