W3C
school
文档首页
HTML
CSS
Javascript
Python
jQuery
NodeJS
PHP
Java
MySQL
Express
More »
开关
TypeScript 官方文档
Advanced Types
Advanced Types
Advanced Types: Discriminated Unions
Advanced Types: Exhaustiveness checking
Advanced Types: Index types
Advanced Types: Index types and string index signatures
Advanced Types: Inference from mapped types
Advanced Types: instanceof type guards
Advanced Types: Intersection Types
Advanced Types: Mapped types
Advanced Types: Nullable types
Advanced Types: Optional parameters and properties
Advanced Types: Polymorphic this types
Advanced Types: String Literal Types
Advanced Types: Type Aliases
Advanced Types: Type Guards and Differentiating Types
Advanced Types: Type guards and type assertions
Advanced Types: typeof type guards
Advanced Types: Union Types
Advanced Types: User-Defined Type Guards
Tutorials
ASP.NET 4
ASP.NET 4: Add a CopyFiles target to the build
ASP.NET 4: Add example code
ASP.NET 4: Add TypeScript
ASP.NET 4: Add TypeScript code
ASP.NET 4: Call the script from a view
ASP.NET 4: Create a new project
ASP.NET 4: Debug
ASP.NET 4: Download packages from NPM
ASP.NET 4: Install TypeScript
ASP.NET 4: Set up the build
ASP.NET 4: Test
ASP.NET 4: Update tsconfig.json
ASP.NET 4: Write a simple Angular app in TypeScript
ASP.NET Core
ASP.NET Core: Add Angular to the gulp build
ASP.NET Core: Add example code
ASP.NET Core: Add NPM dependencies
ASP.NET Core: Add TypeScript
ASP.NET Core: Add TypeScript code
ASP.NET Core: Create a new project
ASP.NET Core: Debug
ASP.NET Core: Install ASP.NET Core and TypeScript
ASP.NET Core: Set up the build
ASP.NET Core: Set up the server
ASP.NET Core: Test
ASP.NET Core: Update tsconfig.json
ASP.NET Core: Write a simple Angular app in TypeScript
ASP.NET Core: Write an HTML page
Gulp
Gulp: Add modules to the code
Gulp: Babel
Gulp: Browserify
Gulp: Create a gulpfile.js
Gulp: Create a page
Gulp: Initialize the project
Gulp: Install our dependencies
Gulp: Minimal project
Gulp: Test the resulting app
Gulp: Uglify
Gulp: Watchify
Gulp: Write a simple example
Knockout
Knockout: Add a TypeScript configuration file
Knockout: Grab our runtime dependencies
Knockout: Initialize the project
Knockout: Install our build dependencies
Knockout: Lay out the project
Knockout: Putting it all together
Knockout: Write some code
Migrating from JavaScript
Migrating from JavaScript: Early Benefits
Migrating from JavaScript: Getting Stricter Checks
Migrating from JavaScript: Gulp
Migrating from JavaScript: Integrating with Build Tools
Migrating from JavaScript: Moving to TypeScript Files
Migrating from JavaScript: Setting up your Directories
Migrating from JavaScript: Webpack
Migrating from JavaScript: Weeding out Errors
Migrating from JavaScript: Writing a Configuration File
React & Webpack
React & Webpack: Add a TypeScript configuration file
React & Webpack: Create a webpack configuration file
React & Webpack: Initialize the project
React & Webpack: Install our dependencies
React & Webpack: Lay out the project
React & Webpack: Putting it all together
React & Webpack: Write some code
Basic Types
Basic Types
Basic Types: Any
Basic Types: Array
Basic Types: Boolean
Basic Types: Enum
Basic Types: Never
Basic Types: Null and Undefined
Basic Types: Number
Basic Types: String
Basic Types: Tuple
Basic Types: Type assertions
Basic Types: Void
Declaration Files
By Example
By Example: Classes
By Example: Global Functions
By Example: Global Variables
By Example: Objects with Properties
By Example: Organizing Types
By Example: Overloaded Functions
By Example: Reusable Types (Interfaces)
By Example: Reusable Types (Type Aliases)
Consumption
Consumption: Consuming
Consumption: Downloading
Consumption: Searching
Deep Dive
Deep Dive: Advanced Combinations
Deep Dive: Definition File Theory: A Deep Dive
Deep Dive: Using with export = or import
Do's & Don'ts
Do's & Don'ts: Generics
Do's & Don'ts: Optional Parameters in Callbacks
Do's & Don'ts: Ordering
Do's & Don'ts: Overloads and Callbacks
Do's & Don'ts: Return Types of Callbacks
Do's & Don'ts: Use Optional Parameters
Do's & Don'ts: Use Union Types
global-modifying-module.d.ts
global-plugin.d.ts
global.d.ts
Introduction
Introduction: Deep Dive
Introduction: Find and Install Declaration Files
Introduction: Library Structures
Introduction: Publish to npm
Introduction: Sections
Introduction: Templates
Introduction: “Do”s and “Don’t”s
Library Structures
Library Structures: Consuming Dependencies
Library Structures: Dependencies on Global Libraries
Library Structures: Dependencies on Modules
Library Structures: Dependencies on UMD libraries
Library Structures: Global Libraries
Library Structures: Global Plugin
Library Structures: Global-modifying Modules
Library Structures: Identifying Kinds of Libraries
Library Structures: Modular Libraries
Library Structures: Module Plugin or UMD Plugin
Library Structures: Preventing Name Conflicts
Library Structures: The Impact of ES6 on Module Plugins
Library Structures: UMD
module-class.d.ts
module-function.d.ts
module-plugin.d.ts
module.d.ts
Publishing
Publishing: Dependencies
Publishing: Publish to @types
Publishing: Red flags
Templates
Classes
Classes
Classes: Abstract Classes
Classes: Accessors
Classes: Constructor functions
Classes: Inheritance
Classes: Parameter properties
Classes: Public by default
Classes: Readonly modifier
Classes: Static Properties
Classes: Understanding private
Classes: Understanding protected
Classes: Using a class as an interface
Project Configuration
Compiler Options
Compiler Options in MSBuild
Compiler Options in MSBuild: Mappings
Compiler Options in MSBuild: ToolsVersion
Compiler Options in MSBuild: TypeScriptCompileBlocked
Integrating with Build Tools
Integrating with Build Tools: Browserify
Integrating with Build Tools: Duo
Integrating with Build Tools: Grunt
Integrating with Build Tools: Gulp
Integrating with Build Tools: Jspm
Integrating with Build Tools: MSBuild
Integrating with Build Tools: NuGet
Integrating with Build Tools: Webpack
Nightly Builds
Nightly Builds: Using npm
Nightly Builds: Using NuGet with MSBuild
tsconfig.json
tsconfig.json: @types, typeRoots and types
tsconfig.json: compileOnSave
tsconfig.json: Configuration inheritance with extends
tsconfig.json: Details
tsconfig.json: Schema
tsconfig.json: Using tsconfig.json
Declaration Merging
Declaration Merging
Declaration Merging: Disallowed Merges
Declaration Merging: Global augmentation
Declaration Merging: Merging Interfaces
Declaration Merging: Merging Namespaces
Declaration Merging: Merging Namespaces with Classes
Declaration Merging: Module Augmentation
Decorators
Decorators
Decorators: Accessor Decorators
Decorators: Class Decorators
Decorators: Composition
Decorators: Evaluation
Decorators: Factories
Decorators: Metadata
Decorators: Method Decorators
Decorators: Parameter Decorators
Decorators: Property Decorators
Enums
Enums
Enums: Ambient enums
Functions
Functions
Functions: Inferring the types
Functions: Optional and Default Parameters
Functions: Overloads
Functions: Rest Parameters
Functions: this
Functions: this and arrow functions
Functions: this parameters
Functions: Typing the function
Functions: Writing the function type
Generics
Generics
Generics: Classes
Generics: Constraints
Generics: Types
Generics: Using Class Types in Generics
Interfaces
Interfaces
Interfaces: Excess Property Checks
Interfaces: Extending Classes
Interfaces: Extending Interfaces
Interfaces: Function Types
Interfaces: Hybrid Types
Interfaces: Indexable Types
Interfaces: Optional Properties
Interfaces: Readonly properties
Iterators & Generators
Iterators & Generators
Iterators & Generators: for...of statements
Iterators & Generators: Iterables
JSX
JSX
JSX: Attribute type checking
JSX: Embedding Expressions
JSX: Intrinsic elements
JSX: React integration
JSX: The as operator
JSX: The JSX result type
JSX: Type Checking
JSX: Value-based elements
Mixins
Mixins
Module Resolution
Module Resolution
Module Resolution: Additional module resolution flags
Module Resolution: Strategies
Module Resolution: Tracing module resolution
Module Resolution: Using --noResolve
Modules
Modules
Modules: Ambient Modules
Modules: Code Generation for Modules
Modules: Default exports
Modules: export = and import = require()
Modules: Export statements
Modules: Exporting a declaration
Modules: Import
Modules: Import a module for side-effects only
Modules: Import a single export from a module
Modules: Re-export to extend
Modules: Re-exports
Namespaces
Namespaces
Namespaces: Aliases
Namespaces: Ambient Namespaces
Namespaces: Multi-file namespaces
Namespaces: Namespaced Validators
Namespaces: Namespacing
Namespaces: Splitting Across Files
Namespaces: Validators in a single file
Namespaces & Modules
Namespaces & Modules
Namespaces & Modules: <reference>-ing a module
Namespaces & Modules: Needless Namespacing
Namespaces & Modules: Using Modules
Namespaces & Modules: Using Namespaces
Symbols
Symbols
Symbols: hasInstance
Symbols: isConcatSpreadable
Symbols: iterator
Symbols: match
Symbols: replace
Symbols: search
Symbols: species
Symbols: split
Symbols: toPrimitive
Symbols: toStringTag
Symbols: unscopables
Triple-Slash Directives
Triple-Slash Directives
Triple-Slash Directives: <amd-dependency />
Triple-Slash Directives: <amd-module />
Triple-Slash Directives: <reference no-default-lib="true"/>
Triple-Slash Directives: <reference path="..." />
Triple-Slash Directives: <reference types="..." />
Type Compatibility
Type Compatibility
Type Compatibility: Classes
Type Compatibility: Enums
Type Compatibility: Function Parameter Bivariance
Type Compatibility: Functions with overloads
Type Compatibility: Generics
Type Compatibility: Optional Parameters and Rest Parameters
Type Compatibility: Private and protected members in classes
Type Inference
Type Inference
Type Inference: Best common type
Type Inference: Contextual Type