Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 07bf919

Browse files
committed
更新 primitive-data-types
1 parent b834a32 commit 07bf919

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ node_modules
22
_book
33
.DS_Store
44
*.log
5+
6+
playground

basics/primitive-data-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let isDone: boolean = false;
2323
let createdByNewBoolean: boolean = new Boolean(1);
2424

2525
// index.ts(1,5): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
26-
// 后面约定,未强调编译错误的代码片段,默认为编译通过
26+
// 后面约定,注释中标出了编译报错的代码片段,表示编译未通过
2727
```
2828

2929
事实上 `new Boolean()` 返回的是一个 `Boolean` 对象:

introduction/hello-typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ console.log(sayHello(user));
5151
编辑器中会提示错误,编译的时候也会出错:
5252

5353
```shell
54-
index.ts(6,36): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'string'.
54+
index.ts(6,22): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'string'.
5555
```
5656

5757
但是还是生成了 js 文件:

introduction/what-is-typescript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
首先,我对 TypeScript 的理解如下:
44

5-
[TypeScript] 是 JavaScript 的一个超集,主要提供了**类型系统****对 ES6 的支持**,它由 Microsoft 开发,代码[开源于 GitHub](https://github.com/Microsoft/TypeScript) 上。
5+
[TypeScript][] 是 JavaScript 的一个超集,主要提供了**类型系统****对 ES6 的支持**,它由 Microsoft 开发,代码[开源于 GitHub](https://github.com/Microsoft/TypeScript) 上。
66

77
其次引用[官网][TypeScript]的定义:
88

0 commit comments

Comments
 (0)