关于全局启用TS配置
作者:互联网
根目录创建【tsconfig.json】
{ "compilerOptions": { "target": "esnext", "module": "esnext", "strict": true, "jsx": "preserve", "importHelpers": true, "moduleResolution": "node", "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "sourceMap": true, "pretty": true, "resolveJsonModule": true, "allowJs": true, "checkJs": true, "suppressImplicitAnyIndexErrors": true, "strictPropertyInitialization": false, "downlevelIteration": true, "noUnusedLocals": false, "noImplicitAny": false, "noImplicitThis": true, "removeComments": false, "strictFunctionTypes": false, "baseUrl": ".", "types": [ "vite/client", "node" ], "typeRoots": [ "./node_modules/@types/", "./types" ], "paths": { "@/*": [ "src/*" ] }, "lib": [ "esnext", "dom", "dom.iterable", "scripthost" ] }, "include": [ "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue" ], "exclude": [ "node_modules", "dist", ], }
标签:node,src,false,启用,TS,esnext,全局,true,types 来源: https://www.cnblogs.com/LW1112/p/15924697.html