-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
89 lines (89 loc) · 2.13 KB
/
tsconfig.json
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"compilerOptions": {
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Node",
"baseUrl": ".",
"strict": true,
"declaration": true,
"composite": true,
"useDefineForClassFields": true,
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
"skipLibCheck": true,
"esModuleInterop": true,
"noEmit": true,
"allowJs": true,
// Web 应用需要 DOM 环境
"lib": [
"ESNext",
"ES2020",
"DOM",
"DOM.Iterable"
],
"typeRoots": [
"./types"
],
"types": [
/** https://juejin.cn/post/7262322846252613693 */
"element-plus/global.d.ts",
// "element-plus/global.d.ts"
"vite/client"
],
"paths": {
"@/*": [
"./src/*"
],
"utils/*": [
"./src/utils/*"
],
"@docs/*": [
"./docs/*"
]
}
},
/** https://www.typescriptlang.org/tsconfig#include */
"include": [
"./docs/rpgmv-dev-notes/.vuepress/components/drill-goods/**/*.ts",
"docs/**/*.ts",
"docs/**/*.d.ts",
"docs/**/*.tsx",
"docs/**/*.vue",
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue",
// 尝试增加指定目录下的vue组件 期望让ts识别出vue组件
"docs/rpgmv-dev-notes/.vuepress/components/**/*.vue",
"docs/rpgmv-dev-notes/.vuepress/types/**/*.d.ts",
"docs/rpgmv-dev-notes/.vuepress/types/auto-imports.d.ts",
"docs/rpgmv-dev-notes/.vuepress/types/components.d.ts",
// 在笔记项目内,增加配置 尝试让typescript识别vue组件的类型
// 组件变成绿色的了 但是对于导入的vue模块而言,仍旧无法推断其类型
"./docs/ruan-cat-notes/docs/.vuepress/components/**/*.vue",
// 测试文件集
"tests/**/*.ts",
"./bin/**/*.ts",
"./.config/**/*.ts",
// 在node端运行的脚本,不在此处做类型声明
// "scripts"
// 包含全部的md文件
"./docs/**/*.md"
],
/* 模仿其他项目加上的排除配置 */
"exclude": [
"node_modules",
"dist"
],
/**
让volar对md提供基础的类型支持
- https://vitepress.dev/guide/using-vue#vs-code-intellisense-support
*/
"vueCompilerOptions": {
"vitePressExtensions": [
".md"
]
}
}