Skip to content

Commit ada42c0

Browse files
SuperLuckyYUsuperman-yuan
authored andcommitted
更新TypeScript栏
1 parent b92c680 commit ada42c0

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

docs/.vuepress/config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ module.exports = {
4343
text: 'Java源码',
4444
link: '/JavaSoundCode/'
4545
},
46+
{
47+
text: '前端框架',
48+
items: [{
49+
text: 'Vue',
50+
link: '/Vue/'
51+
}, {
52+
text: 'TypeScript',
53+
link: '/TypeScript/'
54+
}, {
55+
text: 'React',
56+
link: '/React/'
57+
}]
58+
},
4659
],
4760
}
4861
}

docs/TypeScript/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
sidebar: auto
3+
title: TypeScript
4+
---
5+
# TypeScript
6+
7+
## 介绍
8+
9+
`TypeScript``JavaScript`的超集,拥有静态代码类型。`TypeScript`可以编译成普通`JavaScript`代码然后再去运行。
10+
<br />
11+
js 中的类型为动态类型,可以随意的变:
12+
13+
```js
14+
let b = 123;
15+
b = "123";
16+
```
17+
18+
ts 对应的是静态类型:
19+
20+
```js
21+
let b: number = 123;
22+
b = 456;
23+
```
24+
25+
相对于 JavaScript 优势:
26+
<br />
27+
28+
1. 开发过程中,发现潜在问题。
29+
<br />
30+
2. 更友好的编辑器自动提示。
31+
<br />
32+
3. 代码语意更清晰易懂。
33+
34+
## TypeScript 基础环境搭建

0 commit comments

Comments
 (0)