TypeScript Handbook (Chinese Edition)

I used to hate languages that compile to JavaScript from the bottom of my heart, like CoffeeScript, Dart, etc. But around the Spring Festival of 2015, I fell in love with TypeScript. At the same time, my favorite frameworks, Dojo and AngularJS, also announced that they would use TypeScript for new version development. So what exactly is TypeScript? And what is its charm?

TypeScript is a registered trademark of Microsoft Corporation.

TypeScript has a type system and is a superset of JavaScript. It can be compiled into plain JavaScript code. TypeScript supports any browser, any environment, and any system, and it is open source.

TypeScript is still under active development and improvement, with new features constantly being added. Therefore, this handbook will closely follow every official commit, continuously adding new chapters and revising any inappropriate wording.

If you fall in love with TypeScript at first sight, you can subscribe toand starthis manual to stay up to date with the new native features in ECMAScript 2015 and 2016, and master how to use them in advance with the help of TypeScript! If your love for TypeScript grows stronger, you can learn while translating together with the author.PRs Welcome!!!InRelated LinksAt the end of ... you can find this handbook'sGitHub URL。

Table of Contents

  • Quick start
    • ASP.NET Core
    • ASP.NET 4
    • Gulp
    • Knockout.js
    • React and webpack
    • Angular 2
  • new features
    • TypeScript 1.8
    • TypeScript 1.7
    • TypeScript 1.6
    • TypeScript 1.5
    • TypeScript 1.4
    • TypeScript 1.3
    • TypeScript 1.1
  • Manual
    • basic types
    • Variable declaration
    • interface
    • Class
    • Function
    • Generics
    • Enum
    • type inference
    • Type compatibility
    • advanced types
    • Symbols
    • Iterators and Generators
    • Module
    • namespace
    • Namespaces and modules
    • module resolution
    • declaration merging
    • Writing .d.ts files
    • JSX
    • Decorators
    • Mixin
    • Triple-slash directive
  • project configuration
    • tsconfig.json
    • NPM package types
    • compiler options
    • Using compilation options in MSBuild
    • Integration with other build tools
    • Use TypeScript's daily build version
  • Wiki
    • this in TypeScript
    • coding standards
    • Common compilation errors
    • Editors that support TypeScript
    • Using TypeScript with ASP.NET v5
    • architecture overview
    • Development roadmap

Major Changes (Latest 10 updates)

  • 2016-07-21 Added chapters:noUnusedLocals and noUnusedParameter compiler options
  • 2016-07-21 Added chapters:The include and exclude matching in the tsconfig.json file
  • 2016-07-20 Added chapters:this parameter
  • 2016-07-20 Added chapters:readonly attribute
  • 2016-07-20 Added chapters:Primitive types - Null and Undefined
  • 2016-06-15 New section: Quick Start:Angular 2
  • 2016-06-11 New section: Quick Start:Gulp
  • 2016-04-23 Added chapters:Use TypeScript's daily build version
  • 2016-04-18 Added chapters:new features
  • 2016-04-10 New section: Quick Start:ASP.NET Core

Related Links