Skip to content

Commit 0189ff6

Browse files
committed
feat: ts教程
1 parent 1e36016 commit 0189ff6

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

docs/.vitepress/config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ function sidebar() {
6060
{
6161
text: 'JavaScript',
6262
items: [
63-
{ text: 'import和export', link: './posts/javascript/import' },
63+
{ text: 'import和export', link: './posts/js/import' }
64+
]
65+
},
66+
{
67+
text: 'TypeScript',
68+
items: [
69+
{ text: 'TypeScript总结', link: './posts/ts/index' }
6470
]
65-
6671
},
6772
{
6873
text: 'Markdown',

docs/posts/javascript/import.md renamed to docs/posts/js/import.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export default function getName(name: string) {
2727
return name
2828
}
2929
```
30-
>默认导出后的导入
30+
>默认导出后的导入,不需要在导入的时候使用{}
31+
> 注意: 只有在模块有多个成员被导出的时候使用花括号
3132
```ts
3233
import getName from './index';
3334
```

docs/posts/ts/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ts学习总结
2+
## [阮一峰ts教程](https://www.ruanyifeng.com/blog/2023/08/typescript-tutorial.html)

0 commit comments

Comments
 (0)