TypeScript 4.0 使用手册
有新的特性加入进来。 因此本手册也会紧随官 方的每个commit,不断地更新新的章节以及修改措词不妥之处。 如果你对TypeScript一见钟情,可以订阅and star本手册,及时了解ECMAScript 2015以及2016 里新的原生特性,并借助TypeScript提前掌握使用它们的方式! 如果你对TypeScript的爱愈发浓 烈,可以与楼主一起边翻译边学习,PRs Welcome 接受JavaScript做为输入(通过 allowJs )。 3. 生成的所有文件放在 built 目录下(通过 outDir )。 4. 将JavaScript代码降级到低版本比如ECMAScript 5(通过 target )。 现在,如果你在工程根目录下运行 tsc ,就可以在 built 目录下看到生成的文件。 built 下 的文件应该与 src 下的文件相同。 现 ipt里的所有数字都是浮点数或者大整数 。 这些浮点数的类型 是 number , 而大整数的类型则是 bigint 。 除了支持十进制和十六进制字面量, TypeScript还支持ECMAScript 2015中引入的二进制和八进制字面量。 1. let decLiteral: number = 6; 2. let hexLiteral: number = 0xf00d; 3. let0 码力 | 683 页 | 6.27 MB | 1 年前3
TypeScript Handbook(中文版)
有新的特性加入进来。 因此本 手册也会紧随官方的每个commit,不断地更新新的章节以及修改措词不妥之处。 如果你对TypeScript一见钟情,可以订阅and star本手册,及时了解ECMAScript 2015以及2016里新的原生特性,并借助TypeScript提前掌握使用它们的方式! 如 果你对TypeScript的爱愈发浓烈,可以与楼主一起边翻译边学习,PRs Welcome! 接受JavaScript做为输入(通过 allowJs )。 3. 生成的所有文件放在 built 目录下(通过 outDir )。 4. 将JavaScript代码降级到低版本比如ECMAScript 5(通过 target )。 现在,如果你在工程根目录下运行 tsc ,就可以在 built 目录下看到生成的文 件。 built 下的文件应该与 src 下的文件相同。 现在你的工程里的TypeScript TypeScript 1.1 TypeScript Handbook(中文版) 101 新增功能 TypeScript 2.4 动态导入表达式 动态的 import 表达式是一个新特性,它属于ECMAScript的一部分,允许用户在 程序的任何位置异步地请求某个模块。 这意味着你可以有条件地延迟加载其它模块和库。 例如下面这个 async 函数,它 仅在需要的时候才导入工具库: async0 码力 | 557 页 | 7.48 MB | 1 年前3
The TypeScript HandbookJavaScript runtime tells us that it thinks something is nonsensical. Those cases come up because the ECMAScript specification has explicit instructions on how the language should behave when it runs into something later, but let's now focus on that first point. Type annotations aren't part of JavaScript (or ECMAScript to be pedantic), so there really aren't any browsers or other runtimes that can just run TypeScript from a version of ECMAScript called ECMAScript 2015 (a.k.a. ECMAScript 6, ES2015, ES6, etc. - don't ask). TypeScript has the ability to rewrite code from newer versions of ECMAScript to older ones such0 码力 | 184 页 | 647.99 KB | 1 年前3
Why I Was Wrong About
TypeScriptas God intended.” Why I Was Wrong About TypeScript Why? 3 reasons 1) Commitment to the ECMAScript standard “Some examples [of compile-to-JavaScript frameworks], like Dart, portend that JavaScript0 码力 | 61 页 | 3.65 MB | 1 年前3
共 4 条
- 1













