1
- # TypeScript 新手入門 (正體中文版)
1
+ # 前言
2
2
3
3
從 JavaScript 程式設計師的角度總結思考,循序漸進的理解 TypeScript。
4
4
5
5
## 正體中文翻譯
6
6
7
7
本書 [ TypeScript 新手指南] ( https://willh.gitbook.io/typescript-tutorial/ ) 的原文來自於簡體中文的 [ TypeScript 入门教程] ( https://github.com/xcatliu/typescript-tutorial/ ) 專案,並將其內容翻譯為正體中文版。如有正體中文翻譯不妥的地方,歡迎發 [ Issue] ( https://github.com/doggy8088/typescript-tutorial/issues ) 給我,或到 [ Will 保哥的技術交流中心] ( https://www.facebook.com/will.fans/ ) 粉絲團留言給我,謝謝!🙂
8
8
9
- ---
10
-
11
9
## 關於本書
12
10
13
- - [ 線上閱讀] ( https://ts.xcatliu.com/ ) (部署在 [ GitBook] ( https://www.gitbook.com/book/xcatliu/typescript-tutorial/details ) 上,可能需要翻牆)
14
- - [ 線上閱讀(GitHub 版)] ( https://github.com/xcatliu/typescript-tutorial/blob/master/README.md )
15
- - [ GitHub 地址] [ GitHub ]
16
- - 作者:[ xcatliu] ( https://github.com/xcatliu/ )
17
- - 官方 QQ 群:[ 加入 QQ 群 767142358] ( https://jq.qq.com/?_wv=1027&k=5nkkFCl )
11
+ * [ 線上閱讀] ( https://ts.xcatliu.com/ ) (部署在 [ GitBook] ( https://www.gitbook.com/book/xcatliu/typescript-tutorial/details ) 上,可能需要翻牆)
12
+ * [ 線上閱讀(GitHub 版)] ( https://github.com/xcatliu/typescript-tutorial/blob/master/README.md )
13
+ * [ GitHub 地址] ( https://github.com/xcatliu/typescript-tutorial )
14
+ * 作者:[ xcatliu] ( https://github.com/xcatliu/ )
15
+ * 官方 QQ 群:[ 加入 QQ 群 767142358] ( https://jq.qq.com/?_wv=1027&k=5nkkFCl )
18
16
19
- 本書是作者在學習 [ TypeScript] 後整理的學習筆記。
17
+ 本書是作者在學習 [ TypeScript] ( http://www.typescriptlang.org/ ) 後整理的學習筆記。
20
18
21
- 隨著對 TypeScript 理解的加深和 TypeScript 社群的發展,本書也會做出相應的更新,歡迎大家 [ Star 收藏] [ GitHub ] 。
19
+ 隨著對 TypeScript 理解的加深和 TypeScript 社群的發展,本書也會做出相應的更新,歡迎大家 [ Star 收藏] ( https://github.com/xcatliu/typescript-tutorial ) 。
22
20
23
- - 發現文章內容有問題,可以直接在頁面下方評論
24
- - 對專案的建議,可以[ 提交 issue] ( https://github.com/xcatliu/typescript-tutorial/issues/new ) 向作者反饋
25
- - 歡迎直接提交 pull-request 參與貢獻
21
+ * 發現文章內容有問題,可以直接在頁面下方評論
22
+ * 對專案的建議,可以[ 提交 issue] ( https://github.com/xcatliu/typescript-tutorial/issues/new ) 向作者反饋
23
+ * 歡迎直接提交 pull-request 參與貢獻
26
24
27
25
## 為什麼要寫本書
28
26
29
- TypeScript 雖然有[ 官方手冊] [ Handbook ] 及其[ 非官方中文版] [ 中文手冊 ] ,但是它每一章都希望能詳盡的描述一個概念,導致前面的章節就會包含很多後面才會學習到的內容,而有些本該一開始就瞭解的基礎知識卻在後面才會涉及。如果是初學者,可能需要閱讀多次才能理解。所以它更適合用來查閱,而不是學習。
27
+ TypeScript 雖然有[ 官方手冊] ( http://www.typescriptlang.org/docs/handbook/basic-types.html ) 及其[ 非官方中文版] ( https://zhongsp.gitbooks.io/typescript-handbook/content/ ) ,但是它每一章都希望能詳盡的描述一個概念,導致前面的章節就會包含很多後面才會學習到的內容,而有些本該一開始就瞭解的基礎知識卻在後面才會涉及。如果是初學者,可能需要閱讀多次才能理解。所以它更適合用來查閱,而不是學習。
30
28
31
29
與官方手冊不同,本書著重於從 JavaScript 程式設計師的角度總結思考,循序漸進的理解 TypeScript,希望能給大家一些幫助和啟示。
32
30
33
31
由於一些知識點與官方手冊重合度很高,本書會在相應章節推薦直接閱讀中文手冊。
34
32
35
33
## 關於 TypeScript
36
34
37
- [ TypeScript] 是 JavaScript 的一個超集,主要提供了** 型別系統** 和** 對 ES6 的支援** ,它由 Microsoft 開發,程式碼[ 開源於 GitHub] ( https://github.com/Microsoft/TypeScript ) 上。
35
+ [ TypeScript] ( http://www.typescriptlang.org/ ) 是 JavaScript 的一個超集,主要提供了** 型別系統** 和** 對 ES6 的支援** ,它由 Microsoft 開發,程式碼[ 開源於 GitHub] ( https://github.com/Microsoft/TypeScript ) 上。
38
36
39
37
它的第一個版本釋出於 2012 年 10 月,經歷了多次更新後,現在已成為前端社群中不可忽視的力量,不僅在 Microsoft 內部得到廣泛運用,而且 Google 的 [ Angular2] ( https://angular.io/ ) 也使用了 TypeScript 作為開發語言。
40
38
41
39
## 適合人群
42
40
43
41
本書適合以下人群
44
42
45
- - 熟悉 JavaScript,至少閱讀過一遍[ 《JavaScript 高階程式設計》] ( https://book.douban.com/subject/10546125/ )
46
- - 瞭解 ES6,推薦閱讀 [ ECMAScript 6 入門]
47
- - 瞭解 Node.js,會用 npm 安裝及使用一些工具
48
- - 想了解 TypeScript 或者想對 TypeScript 有更深的理解
43
+ * 熟悉 JavaScript,至少閱讀過一遍[ 《JavaScript 高階程式設計》] ( https://book.douban.com/subject/10546125/ )
44
+ * 瞭解 ES6,推薦閱讀 [ ECMAScript 6 入門] ( http://es6.ruanyifeng.com/ )
45
+ * 瞭解 Node.js,會用 npm 安裝及使用一些工具
46
+ * 想了解 TypeScript 或者想對 TypeScript 有更深的理解
49
47
50
48
本書** 不適合** 以下人群
51
49
52
- - 沒有系統學習過 JavaScript
53
- - 已經能夠很熟練的運用 TypeScript
50
+ * 沒有系統學習過 JavaScript
51
+ * 已經能夠很熟練的運用 TypeScript
54
52
55
53
## 評價
56
54
@@ -60,35 +58,35 @@ TypeScript 雖然有[官方手冊][Handbook]及其[非官方中文版][中文手
60
58
61
59
## 目錄
62
60
63
- - [ 前言] ( README.md )
64
- - [ 簡介] ( introduction/README.md )
65
- - [ 什麼是 TypeScript] ( introduction/what-is-typescript.md )
66
- - [ 安裝 TypeScript] ( introduction/get-typescript.md )
67
- - [ Hello TypeScript] ( introduction/hello-typescript.md )
68
- - [ 基礎] ( basics/README.md )
69
- - [ 原始資料型別] ( basics/primitive-data-types.md )
70
- - [ 任意值] ( basics/any.md )
71
- - [ 型別推論] ( basics/type-inference.md )
72
- - [ 聯合型別] ( basics/union-types.md )
73
- - [ 物件的型別——介面] ( basics/type-of-object-interfaces.md )
74
- - [ 陣列的型別] ( basics/type-of-array.md )
75
- - [ 函式的型別] ( basics/type-of-function.md )
76
- - [ 型別斷言] ( basics/type-assertion.md )
77
- - [ 宣告檔案] ( basics/declaration-files.md )
78
- - [ 內建物件] ( basics/built-in-objects.md )
79
- - [ 進階] ( advanced/README.md )
80
- - [ 型別別名] ( advanced/type-aliases.md )
81
- - [ 字串字面量型別] ( advanced/string-literal-types.md )
82
- - [ 元組] ( advanced/tuple.md )
83
- - [ 列舉] ( advanced/enum.md )
84
- - [ 類別] ( advanced/class.md )
85
- - [ 類別與介面] ( advanced/class-and-interfaces.md )
86
- - [ 泛型] ( advanced/generics.md )
87
- - [ 宣告合併] ( advanced/declaration-merging.md )
88
- - [ 擴充套件閱讀] ( advanced/further-reading.md )
89
- - [ 工程] ( engineering/README.md )
90
- - [ 程式碼檢查] ( engineering/lint.md )
91
- - [ 感謝] ( thanks/README .md )
61
+ * [ 前言] ( ./ )
62
+ * [ 簡介] ( introduction/ )
63
+ * [ 什麼是 TypeScript] ( introduction/what-is-typescript.md )
64
+ * [ 安裝 TypeScript] ( introduction/get-typescript.md )
65
+ * [ Hello TypeScript] ( introduction/hello-typescript.md )
66
+ * [ 基礎] ( basics/ )
67
+ * [ 原始資料型別] ( basics/primitive-data-types.md )
68
+ * [ 任意值] ( basics/any.md )
69
+ * [ 型別推論] ( basics/type-inference.md )
70
+ * [ 聯合型別] ( basics/union-types.md )
71
+ * [ 物件的型別——介面] ( basics/type-of-object-interfaces.md )
72
+ * [ 陣列的型別] ( basics/type-of-array.md )
73
+ * [ 函式的型別] ( basics/type-of-function.md )
74
+ * [ 型別斷言] ( basics/type-assertion.md )
75
+ * [ 宣告檔案] ( basics/declaration-files.md )
76
+ * [ 內建物件] ( basics/built-in-objects.md )
77
+ * [ 進階] ( advanced/ )
78
+ * [ 型別別名] ( advanced/type-aliases.md )
79
+ * [ 字串字面量型別] ( advanced/string-literal-types.md )
80
+ * [ 元組] ( advanced/tuple.md )
81
+ * [ 列舉] ( advanced/enum.md )
82
+ * [ 類別] ( advanced/class.md )
83
+ * [ 類別與介面] ( advanced/class-and-interfaces.md )
84
+ * [ 泛型] ( advanced/generics.md )
85
+ * [ 宣告合併] ( advanced/declaration-merging.md )
86
+ * [ 擴充套件閱讀] ( advanced/further-reading.md )
87
+ * [ 工程] ( engineering/ )
88
+ * [ 程式碼檢查] ( engineering/lint.md )
89
+ * [ 感謝] ( thanks.md )
92
90
93
91
## 版權許可
94
92
@@ -100,16 +98,8 @@ TypeScript 雖然有[官方手冊][Handbook]及其[非官方中文版][中文手
100
98
101
99
## 相關資料
102
100
103
- - [ TypeScript 官網] [ TypeScript ]
104
- - [ Handbook] ([ 中文版] [ 中文手冊 ] )
105
- - [ ECMAScript 6 入門]
106
-
107
- ---
108
-
109
- - [ 下一章:簡介] ( introduction/README.md )
101
+ * [ TypeScript 官網] ( http://www.typescriptlang.org/ )
102
+ * [ Handbook] ( http://www.typescriptlang.org/docs/handbook/basic-types.html ) ([ 中文版] ( https://zhongsp.gitbooks.io/typescript-handbook/content/ ) )
103
+ * [ ECMAScript 6 入門] ( http://es6.ruanyifeng.com/ )
104
+ * [ 下一章:簡介] ( introduction/ )
110
105
111
- [ GitHub ] : https://github.com/xcatliu/typescript-tutorial
112
- [ TypeScript ] : http://www.typescriptlang.org/
113
- [ Handbook ] : http://www.typescriptlang.org/docs/handbook/basic-types.html
114
- [ 中文手冊 ] : https://zhongsp.gitbooks.io/typescript-handbook/content/
115
- [ ECMAScript 6 入門 ] : http://es6.ruanyifeng.com/
0 commit comments