Repository navigation
Expand file tree
/
Copy pathtsconfig.builder.json
More file actions
51 lines (51 loc) · 2.28 KB
/
Copy pathtsconfig.builder.json
File metadata and controls
51 lines (51 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"paths": {
"@angular/build/private": [
"./node_modules/@angular/build/src/private.d.ts"
],
// vite 的 package.json 没有 main / types 字段,只靠 exports map,
// moduleResolution: node10 认不出来,这里显式指到类型入口
"vite": ["./node_modules/vite/dist/node/index.d.ts"],
// 同上:这两个子路径也只靠 exports map 暴露。
// vitest/internal/browser 才是设备端 runner 入口(startTests / collectTests)。
// 注意 **不是** vitest/browser —— 那个 specifier 指向 browser/context.js,
// 一个「只在 browser mode 里可用」的桩,import 即 throw。
// vite/module-runner 提供 EvaluatedModules。
"vitest/internal/browser": ["./node_modules/vitest/dist/browser.d.ts"],
"vite/module-runner": [
"./node_modules/vite/dist/node/module-runner.d.ts"
],
// abortcontroller-polyfill 完全没有类型(也无 @types 包),
// 用本地最小声明撑住。见该文件顶部说明。
"abortcontroller-polyfill/dist/abortcontroller": [
"./src/builder/platform/template/abortcontroller-ponyfill.d.ts"
],
// static-injector 7 只靠 exports map 暴露类型(types: ./import/index.d.ts),
// moduleResolution: node10 认不出来(与 vite / @angular/* 同因)。
// 不映射的话 strict 下会报 TS7016 隐式 any,inject() 也丢类型。
"static-injector": ["./node_modules/static-injector/import/index.d.ts"]
},
"noImplicitThis": true,
// 原先进程是 script/build.ts(为了挂 static-injector transformer),它会先把
// 所有诊断跑完再决定要不要 emit。改成直接 tsc 后,这两项必须显式声明,
// 否则类型报错仍会把脏 JS 写进 dist/。
"noEmitOnError": true,
// TS 6.0 CLI 会报 TS5011(程序化 API 不报),必须显式声明 rootDir。
"rootDir": "./src/builder",
"outDir": "./dist/builder",
"declaration": false,
"strict": true
},
"include": ["src/builder"],
"exclude": [
"./**/fixture",
"./**/*.template.ts",
"./**/*.d.ts",
"**/*.spec.ts",
"**/*.xspec.ts",
"**/*/karma/plugin/**/*",
"**/*/karma/client/**/*"
]
}