Repository navigation
Expand file tree
/
Copy pathtsconfig.spec.json
More file actions
56 lines (56 loc) · 2.49 KB
/
Copy pathtsconfig.spec.json
File metadata and controls
56 lines (56 loc) · 2.49 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
52
53
54
55
56
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"sourceMap": true,
// 与 tsconfig.library.json 对齐:小程序运行时不是 DOM,但代码大量
// **使用 DOM 类型**(Document / HTMLElement / Node 等),
// base 的 ES2019 没有这些,spec 侧必须补上,否则类型对不上。
"lib": ["es2022", "dom", "dom.iterable"],
"types": ["vitest/globals", "node"],
"paths": {
// @angular/core/testing 只靠 exports map,moduleResolution: node10
// 认不出来(与 vite 同因),显式指到类型入口
"@angular/core/testing": [
"./node_modules/@angular/core/types/testing.d.ts"
],
"@angular/localize/init": [
"./node_modules/@angular/localize/types/init.d.ts"
],
"@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"],
"angular-miniprogram/platform/default": [
"./src/library/platform/default/index.ts"
],
"angular-miniprogram/platform/wx": ["./src/library/platform/wx/index.ts"],
"angular-miniprogram/platform/type": [
"./src/library/platform/type/index.ts"
],
"angular-miniprogram/platform": ["./src/library/platform/index.ts"],
"angular-miniprogram/api": ["./src/library/api/index.ts"],
// 同 tsconfig.library.json:Angular 22 子路径只靠 exports map,
// moduleResolution: node 认不出来。
"@angular/common/http": [
"./node_modules/@angular/common/types/http.d.ts"
],
"@angular/common": ["./node_modules/@angular/common/types/common.d.ts"],
// 同 tsconfig.builder.json:static-injector 7 只靠 exports map 暴露类型。
// spec 侧不映射也能跑(strict: false 不报 TS7016),但 inject() 会被当成
// any,类型错误静默——所以这里也显式指上。
"static-injector": ["./node_modules/static-injector/import/index.d.ts"]
}
},
"exclude": [
"**/fixture/**",
// hello-world-app 是构建 fixture,里面 src/spec/** 是
// karma builder 在小程序运行时里跑的 fixture spec,用的是 jasmine,
// 不属于本仓库的 vitest 套件
"test/hello-world-app/**",
"test/test-project-host-*/**"
],
"files": [],
"include": ["src/**/*.spec.ts", "test/**/*.ts"]
}