From 5776d8dba047d4135c0e6117e5a2d396f2fc6978 Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Fri, 1 Nov 2024 15:11:26 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20:hammer:=20typescript=20=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=99=A8=E9=85=8D=E7=BD=AE=E6=B3=A8=E9=87=8A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=92=8C=E4=B9=A6=E5=86=99=E9=A1=BA=E5=BA=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index cbe0a4da..7afb4fcd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,33 @@ { "compilerOptions": { "target": "esnext", - "useDefineForClassFields": true, "module": "esnext", "moduleResolution": "node", - "strict": true, - "noLib": false, - "sourceMap": true, - "resolveJsonModule": true, - "esModuleInterop": true, "lib": ["esnext", "dom"], "baseUrl": ".", - "allowJs": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, "paths": { "@/*": ["src/*"] }, + + // 严格性和类型检查相关配置 + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + + // 模块和兼容性相关配置 + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "resolveJsonModule": true, + + // 调试和兼容性相关配置 + "sourceMap": true, + "useDefineForClassFields": true, + "allowJs": true, + + // 类型声明相关配置 "types": ["node", "vite/client", "element-plus/global"] }, + "include": ["mock/**/*.ts", "src/**/*.ts", "src/**/*.vue", "vite.config.ts"], "exclude": ["node_modules", "dist"] }