GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — typescript-tutorial/advanced/further-reading.md at master · yumin2/typescript-tutorial

Expand file tree

/

further-reading.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
27 lines (22 loc) · 5.14 KB
/

further-reading.md

Copy path

File metadata and controls

27 lines (22 loc) · 5.14 KB
Raw
Copy raw file
Download raw file
Edit and raw actions

扩展阅读

此处记录了官方手册(中文版)中包含,但是本书未涉及的概念。

我认为它们是一些不重要或者不属于 TypeScript 的概念,所以这里只给出一个简单的释义,详细内容可以点击链接深入理解。

  • Never(中文版):永远不存在值的类型,一般用于错误处理函数
  • Variable Declarations(中文版):使用 let 和 const 替代 var,这是 ES6 的知识
  • this:箭头函数的运用,这是 ES6 的知识
  • Using Class Types in Generics(中文版):创建工厂函数时,需要引用构造函数的类类型
  • Best common type(中文版):数组的类型推论
  • Contextual Type(中文版):函数输入的类型推论
  • Type Compatibility(中文版):允许不严格符合类型,只需要在一定规则下兼容即可
  • Advanced Types(中文版):使用 & 将多种类型的共有部分叠加成一种类型
  • Type Guards and Differentiating Types(中文版):联合类型在一些情况下被识别为特定的类型
  • Discriminated Unions(中文版):使用 | 联合多个接口的时候,通过一个共有的属性形成可辨识联合
  • Polymorphic this types(中文版):父类的某个方法返回 this,当子类继承父类后,子类的实例调用此方法,返回的 this 能够被 TypeScript 正确的识别为子类的实例。
  • Symbols(中文版):新原生类型,这是 ES6 的知识
  • Iterators and Generators(中文版):迭代器,这是 ES6 的知识
  • Namespaces(中文版):避免全局污染,现在已被 ES6 Module 替代
  • Decorators(中文版):修饰器,这是 ES7 的一个提案
  • Mixins(中文版):一种编程模式,与 TypeScript 没有直接关系,可以参考 ES6 中 Mixin 模式的实现

  • 上一章:声明合并
  • 下一章:工程
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.