mm
This commit is contained in:
@@ -42,33 +42,19 @@
|
||||
*/
|
||||
"declaration": true,
|
||||
|
||||
/**
|
||||
* 只做类型检查,不生成 JS 输出
|
||||
* - 适用于 Vite / Next / Nuxt 等 bundler 场景
|
||||
* - 防止 tsc 与构建工具重复 emit
|
||||
*/
|
||||
"noEmit": true,
|
||||
|
||||
/**
|
||||
* 强制单文件可独立编译
|
||||
* - 适配 esbuild / SWC / bundler 编译模型
|
||||
* - 禁止依赖跨文件类型推断(enum / namespace 等)
|
||||
*/
|
||||
"isolatedModules": true,
|
||||
|
||||
/**
|
||||
* 允许在 import 中显式使用 .ts / .tsx 后缀
|
||||
* - 兼容 Node ESM / bundler 对文件扩展名的严格要求
|
||||
* - 避免 `import './foo'` 在 TS + ESM 下歧义
|
||||
*/
|
||||
"allowImportingTsExtensions": true
|
||||
"isolatedModules": true
|
||||
},
|
||||
/**
|
||||
* 参与类型检查和编译的文件
|
||||
* - 只扫描 src
|
||||
* - 其它目录通过 exclude 排除
|
||||
*/
|
||||
"include": ["src", "scripts"],
|
||||
"include": ["src"],
|
||||
|
||||
/**
|
||||
* 明确排除非源码内容
|
||||
|
||||
Reference in New Issue
Block a user