- 新增 tsconfig.json 配置 - 新增 types/ 目录(7个类型定义文件,与后端 DTO 对齐) - 迁移 vite.config.js → vite.config.ts - 迁移 main.js → main.ts - 迁移 utils/api.js → utils/api.ts(泛型化请求封装) - 迁移 utils/currency.js → utils/currency.ts - 迁移 6 个 Vue 页面组件(添加 lang="ts" 和类型注解) - 新增 TYPESCRIPT_MIGRATION.md 迁移计划文档 - 更新 todo.md 进度 收益:完整类型提示、编译时错误检查、重构安全性提升
36 lines
726 B
JSON
36 lines
726 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ESNext",
|
|
"useDefineForClassFields": true,
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"strict": true,
|
|
"jsx": "preserve",
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"esModuleInterop": true,
|
|
"lib": ["ESNext", "DOM"],
|
|
"skipLibCheck": true,
|
|
"noEmit": true,
|
|
"ignoreDeprecations": "6.0",
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"@/*": ["./*"],
|
|
"@/utils/*": ["utils/*"],
|
|
"@/types/*": ["types/*"]
|
|
},
|
|
"typeRoots": ["./types", "./node_modules/@types"]
|
|
},
|
|
"include": [
|
|
"**/*.ts",
|
|
"**/*.d.ts",
|
|
"**/*.tsx",
|
|
"**/*.vue"
|
|
],
|
|
"exclude": [
|
|
"node_modules",
|
|
"uni_modules",
|
|
"dist"
|
|
]
|
|
}
|