File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 10
10
.vp-doc li + li {
11
11
text-align : justify;
12
12
}
13
+
14
+ .vp-doc .custom-block a {
15
+ text-decoration : underline;
16
+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ outline: 'deep'
8
8
9
9
考虑到后面还会不定期更新内容,所以翻了一下之前跟朋友的微信聊天记录整理了前期的更新记录,之后当文档有再次更新的时候也会继续整理更新记录,方便读者们查阅。
10
10
11
+ ## 2024-04-06
12
+
13
+ 在 [ 快速上手 TypeScript] ( typescript.md ) 一章里的 “如何编译为 JavaScript 代码” 一节,对 build script 中新增了一个选项 ` --skipLibCheck ` ,关于这个改动请见 [ 干净的 TypeScript 项目在编译时报错 Cannot find module 'undici-types' 的原因和解决] ( https://chengpeiquan.com/article/typescript-error-cannot-find-module-undici-types.html ) 一文。
14
+
15
+ 感谢 [ @rainmonG ] ( https://github.com/rainmonG ) 在 [ #193 (comment)] ( https://github.com/chengpeiquan/learning-vue3/issues/193#issuecomment-2036541817 ) 的反馈。
16
+
11
17
## 2024-02-20
12
18
13
19
在 [ 单组件的编写] ( component.md ) 、 [ 路由的使用] ( router.md ) 、 [ 插件的开发和使用] ( plugin.md ) 、 [ 组件之间的通信] ( communication.md ) 、 [ 全局状态管理] ( pinia.md ) 这几张内容的最前面,补充了一个阅读提示,解答近期收到的读者反馈的一些疑惑。
@@ -40,7 +46,7 @@ outline: 'deep'
40
46
41
47
## 2022-11-17
42
48
43
- 更新了 “用 ES Module 设计模块” 中关于 [ 命名导出和导入] ( guide.md#命名导出和导入-1 ) 的讲解,减少在理解上的歧义,感谢 [ @Yeshan-Taoist ] ( https://github.com/Yeshan-Taoist ) 在 [ #163 (commont )] ( https://github.com/chengpeiquan/learning-vue3/issues/163#issuecomment-1317193359 ) 的反馈。
49
+ 更新了 “用 ES Module 设计模块” 中关于 [ 命名导出和导入] ( guide.md#命名导出和导入-1 ) 的讲解,减少在理解上的歧义,感谢 [ @Yeshan-Taoist ] ( https://github.com/Yeshan-Taoist ) 在 [ #163 (comment )] ( https://github.com/chengpeiquan/learning-vue3/issues/163#issuecomment-1317193359 ) 的反馈。
44
50
45
51
## 2022-11-12
46
52
Original file line number Diff line number Diff line change @@ -1179,7 +1179,7 @@ foo = true // true
1179
1179
"dev:cjs": "node src/cjs/index.cjs",
1180
1180
"dev:esm": "node src/esm/index.mjs",
1181
1181
"dev:ts": "ts-node src/ts/index.ts",
1182
- "build": "tsc src/ts/index.ts --outDir dist",
1182
+ "build": "tsc src/ts/index.ts --skipLibCheck -- outDir dist",
1183
1183
"compile": "babel src/babel --out-dir compiled",
1184
1184
"serve": "node server/index.js"
1185
1185
},
@@ -1201,6 +1201,10 @@ foo = true // true
1201
1201
1202
1202
其中 `tsc` 是 TypeScript 用来编译文件的命令, `--outDir` 是它的一个选项,用来指定输出目录,如果不指定,则默认生成到源文件所在的目录下面。
1203
1203
1204
+ :::tip
1205
+ 笔者 2024 -04 -06 注:在 build script 中新增了一个选项 `--skipLibCheck` ,关于这个改动请见 [干净的 TypeScript 项目在编译时报错 Cannot find module 'undici-types' 的原因和解决](https://chengpeiquan.com/article/typescript-error-cannot-find-module-undici-types.html) 一文。
1206
+ :::
1207
+
1204
1208
把之前在 [函数的重载](#函数的重载) 用过的这个例子放到 `src/ts/index.ts` 文件里,因为它是一段比较典型的、包含了多个知识点的 TypeScript 代码:
1205
1209
1206
1210
```ts
@@ -1381,7 +1385,7 @@ Welcome, Petter!
1381
1385
// ...
1382
1386
" scripts" : {
1383
1387
// ...
1384
- " build" : " tsc src/ts/index.ts --outDir dist --target es6"
1388
+ " build" : " tsc src/ts/index.ts --skipLibCheck -- outDir dist --target es6"
1385
1389
}
1386
1390
// ...
1387
1391
}
You can’t perform that action at this time.
0 commit comments