Table of Contents
ASP.NET Core
ASP.NET Core
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: Test
ASP.NET Core: Write a HTML page
Classes
Classes
Classes: abstract Classes and Members
Classes: Class Expressions
Classes: Class Heritage
Classes: Class Members
Classes: Generic Classes
Classes: Member Visibility
Classes: Parameter Properties
Classes: Relationships Between Classes
Classes: static Blocks in Classes
Classes: Static Members
Classes: this at Runtime in Classes
Classes: this Types
Compiler Options in MSBuild
Compiler Options in MSBuild
Compiler Options in MSBuild: Overview
Compiler Options in MSBuild: Using a tsconfig.json
Compiler Options in MSBuild: Using Project Settings
Conditional Types
Conditional Types
Conditional Types: Distributive Conditional Types
Configuring Watch
Configuring Watch
Configuring Watch: Background
Configuring Watch: Configuring directory watching using environment variable TSC_WATCHDIRECTORY
Configuring Watch: Configuring file watching using a tsconfig.json
Configuring Watch: Configuring file watching using environment variable TSC_WATCHFILE
Consumption
Consumption
Consumption: Consuming
Consumption: Downloading
Consumption: Searching
Creating .d.ts Files from .js files
Creating .d.ts Files from .js files
Creating .d.ts Files from .js files: Editing the package.json
Creating .d.ts Files from .js files: Run the compiler
Creating .d.ts Files from .js files: Setting up your Project to emit .d.ts files
Creating .d.ts Files from .js files: Tips
Creating Types from Types
Creating Types from Types
Declaration Merging
Declaration Merging
Declaration Merging: Basic Concepts
Declaration Merging: Disallowed Merges
Declaration Merging: Global augmentation
Declaration Merging: Introduction
Declaration Merging: Merging Interfaces
Declaration Merging: Merging Namespaces
Declaration Merging: Merging Namespaces with Classes
Declaration Merging: Merging Namespaces with Classes, Functions, and Enums
Declaration Merging: Module Augmentation
Declaration Reference
Declaration Reference
Declaration Reference: Classes
Declaration Reference: Global Functions
Declaration Reference: Global Variables
Declaration Reference: Objects with Properties
Declaration Reference: Organizing Types
Declaration Reference: Overloaded Functions
Declaration Reference: Reusable Types (Interfaces)
Declaration Reference: Reusable Types (Type Aliases)
Decorators
Decorators
Decorators: Accessor Decorators
Decorators: Class Decorators
Decorators: Decorator Composition
Decorators: Decorator Evaluation
Decorators: Decorator Factories
Decorators: Decorators
Decorators: Introduction
Decorators: Metadata
Decorators: Method Decorators
Decorators: Parameter Decorators
Decorators: Property Decorators
Deep Dive
Deep Dive
Deep Dive: Advanced Combinations
Deep Dive: Declaration File Theory: A Deep Dive
Deep Dive: Key Concepts
Deep Dive: Simple Combinations: One name, multiple meanings
Do's and Don'ts
Do's and Don'ts
Do's and Don'ts: any
Do's and Don'ts: Callback Types
Do's and Don'ts: Function Overloads
Do's and Don'ts: General Types
Do's and Don'ts: Generics
Do's and Don'ts: Number, String, Boolean, Symbol and Object
Do's and Don'ts: Optional Parameters in Callbacks
Do's and Don'ts: Ordering
Do's and Don'ts: Overloads and Callbacks
Do's and Don'ts: Return Types of Callbacks
Do's and Don'ts: Use Optional Parameters
Do's and Don'ts: Use Union Types
DOM Manipulation
DOM Manipulation
DOM Manipulation: Basic Example
DOM Manipulation: Difference between children and childNodes
DOM Manipulation: DOM Manipulation
DOM Manipulation: Interested in learning more?
DOM Manipulation: The Document Interface
DOM Manipulation: The Node interface
DOM Manipulation: The querySelector and querySelectorAll methods
Enums
Enums
Enums: Ambient enums
Enums: Computed and constant members
Enums: Enums at compile time
Enums: Enums at runtime
Enums: Heterogeneous enums
Enums: Numeric enums
Enums: Objects vs Enums
Enums: String enums
Enums: Union enums and enum member types
Everyday Types
Everyday Types
Everyday Types: any
Everyday Types: Arrays
Everyday Types: Enums
Everyday Types: Functions
Everyday Types: Interfaces
Everyday Types: Less Common Primitives
Everyday Types: Literal Types
Everyday Types: null and undefined
Everyday Types: Object Types
Everyday Types: The primitives: string, number, and boolean
Everyday Types: Type Aliases
Everyday Types: Type Annotations on Variables
Everyday Types: Type Assertions
Everyday Types: Union Types
Experimental Support for ECMAScript Modules in Node.js
Experimental Support for ECMAScript Modules in Node.js
Generics
Generics
Generics: Generic Classes
Generics: Generic Constraints
Generics: Generic Types
Generics: Hello World of Generics
Generics: Using Class Types in Generics
Generics: Using Type Parameters in Generic Constraints
Generics: Working with Generic Type Variables
Global .d.ts
Global .d.ts
Global .d.ts: Examples of Global Libraries
Global .d.ts: Global Libraries
Global .d.ts: Global Library Template
Global .d.ts: Identifying a Global Library from Code
Global: Modifying Module
Global: Modifying Module
Global: Modifying Module: Global-modifying Modules
Global: Modifying Module: Identifying global-modifying modules
Global: Plugin
Global: Plugin
Global: Plugin: Consuming Dependencies
Global: Plugin: Dependencies on Global Libraries
Global: Plugin: Dependencies on Modules
Global: Plugin: Dependencies on UMD libraries
Global: Plugin: Footnotes
Global: Plugin: Global Plugin
Global: Plugin: Global-modifying Modules
Global: Plugin: Library file layout
Global: Plugin: Module Plugin or UMD Plugin
Global: Plugin: Preventing Name Conflicts
Global: Plugin: The Impact of ES6 on Module Call Signatures
Global: Plugin: The Impact of ES6 on Module Plugins
Global: Plugin: UMD
Gulp
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: Terser
Gulp: Test the resulting app
Gulp: Watchify
Gulp: Watchify, Babel, and Terser
Gulp: Write a simple example
Handbook (deprecated)
Basic Types
Classes
Functions
Generics
Interfaces
Indexed Access Types
Indexed Access Types
Integrating with Build Tools
Integrating with Build Tools
Integrating with Build Tools: Babel
Integrating with Build Tools: Browserify
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: Rollup
Integrating with Build Tools: Svelte Compiler
Integrating with Build Tools: Vite
Integrating with Build Tools: Webpack
Introduction
Introduction
Introduction: Declaration Reference
Introduction: Deep Dive
Introduction: Do’s and Don’ts
Introduction: Find and Install Declaration Files
Introduction: Library Structures
Introduction: Publish to npm
Iterators and Generators
Iterators and Generators
Iterators and Generators: Iterables
JS Projects Utilizing TypeScript
JS Projects Utilizing TypeScript
JS Projects Utilizing TypeScript: @ts-check
JS Projects Utilizing TypeScript: Providing Type Hints in JS via JSDoc
JS Projects Utilizing TypeScript: TypeScript with JavaScript
JSDoc Reference
JSDoc Reference
JSDoc Reference: Classes
JSDoc Reference: Documentation
JSDoc Reference: Other
JSDoc Reference: Types
JSX
JSX
JSX: Attribute type checking
JSX: Basic usage
JSX: Children 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
Keyof Type Operator
Keyof Type Operator
Keyof Type Operator: The keyof type operator
Library Structures
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: Footnotes
Library Structures: Global Libraries
Library Structures: Identifying Kinds of Libraries
Library Structures: Modular Libraries
Library Structures: Preventing Name Conflicts
Library Structures: Smaller samples for different types of libraries
Library Structures: The Impact of ES6 on Module Call Signatures
Library Structures: UMD
Library Structures: What should you look for?
Mapped Types
Mapped Types
Mapped Types: Key Remapping via as
Migrating from JavaScript
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
Mixins
Mixins
Mixins: Alternative Pattern
Mixins: Constrained Mixins
Mixins: Constraints
Mixins: How Does A Mixin Work?
Module Resolution
Module Resolution
Module Resolution: Additional module resolution flags
Module Resolution: Common Questions
Module Resolution: Module Resolution Strategies
Module Resolution: Relative vs. Non-relative module imports
Module Resolution: Tracing module resolution
Module Resolution: Using --noResolve
Module: Class
Module: Class
Module: Function
Module: Function
Module: Plugin
Module: Plugin
Module: Plugin: The Impact of ES6 on Module Plugins
Modules
Modules
Modules
Modules: Ambient Modules
Modules: Code Generation for Modules
Modules: CommonJS Syntax
Modules: Default exports
Modules: Do not use namespaces in modules
Modules: Export
Modules: export = and import = require()
Modules: Export all as x
Modules: Export as close to top-level as possible
Modules: Export statements
Modules: Exporting a declaration
Modules: Guidance for structuring modules
Modules: How JavaScript Modules are Defined
Modules: Import
Modules: Import a module for side-effects only
Modules: Import a single export from a module
Modules: Import the entire module into a single variable, and use it to access the module exports
Modules: Importing Types
Modules: Modules in TypeScript
Modules: Non-modules
Modules: Optional Module Loading and Other Advanced Loading Scenarios
Modules: Re-export to extend
Modules: Re-exports
Modules: Red Flags
Modules: Simple Example
Modules: TypeScript namespaces
Modules: TypeScript’s Module Output Options
Modules: TypeScript’s Module Resolution Options
Modules: Working with Other JavaScript Libraries
Modules .d.ts
Modules .d.ts
Modules .d.ts: Common CommonJS Patterns
Modules .d.ts: Comparing JavaScript to an example DTS
Modules .d.ts: Handling Many Consuming Import
Modules .d.ts: Reference Example
Modules .d.ts: Types in Modules
More on Functions
More on Functions
More on Functions: Assignability of Functions
More on Functions: Call Signatures
More on Functions: Construct Signatures
More on Functions: Function Overloads
More on Functions: Function Type Expressions
More on Functions: Generic Functions
More on Functions: Optional Parameters
More on Functions: Other Types to Know About
More on Functions: Parameter Destructuring
More on Functions: Rest Parameters and Arguments
Namespaces
Namespaces
Namespaces: Aliases
Namespaces: Ambient Namespaces
Namespaces: First steps
Namespaces: Multi-file namespaces
Namespaces: Namespaced Validators
Namespaces: Namespacing
Namespaces: Splitting Across Files
Namespaces: Validators in a single file
Namespaces: Working with Other JavaScript Libraries
Namespaces and Modules
Namespaces and Modules
Namespaces and Modules: /// <reference>-ing a module
Namespaces and Modules: Needless Namespacing
Namespaces and Modules: Pitfalls of Namespaces and Modules
Namespaces and Modules: Trade-offs of Modules
Namespaces and Modules: Using Modules
Namespaces and Modules: Using Namespaces
Nightly Builds
Nightly Builds
Nightly Builds: Updating your IDE to use the nightly builds
Nightly Builds: Using npm
Object Types
Object Types
Object Types: Extending Types
Object Types: Generic Object Types
Object Types: Interfaces vs. Intersections
Object Types: Intersection Types
Object Types: Property Modifiers
Project References
Project References
Project References: An Example Project
Project References: Build Mode for TypeScript
Project References: Caveats
Project References: Caveats for Project References
Project References: composite
Project References: declarationMaps
Project References: Guidance
Project References: MSBuild
Project References: Overall Structure
Project References: prepend with outFile
Project References: Structuring for outFiles
Project References: Structuring for relative modules
Project References: tsc -b Commandline
Project References: What is a Project Reference?
Publishing
Publishing
Publishing: Dependencies
Publishing: Including declarations in your npm package
Publishing: Matching behavior
Publishing: Multiple fields
Publishing: Publish to @types
Publishing: Red flags
Publishing: Version selection with typesVersions
Symbols
Symbols
Symbols: Symbol.hasInstance
Symbols: Symbol.isConcatSpreadable
Symbols: Symbol.iterator
Symbols: Symbol.match
Symbols: Symbol.replace
Symbols: Symbol.search
Symbols: Symbol.species
Symbols: Symbol.split
Symbols: Symbol.toPrimitive
Symbols: Symbol.toStringTag
Symbols: Symbol.unscopables
Symbols: unique symbol
Symbols: Well-known Symbols
Template Literal Types
Template Literal Types
Template Literal Types: Intrinsic String Manipulation Types
Templates
Templates
The Basics
The Basics
The Basics: Downleveling
The Basics: Emitting with Errors
The Basics: Erased Types
The Basics: Explicit Types
The Basics: noImplicitAny
The Basics: Non-exception Failures
The Basics: Static type-checking
The Basics: Strictness
The Basics: strictNullChecks
The Basics: tsc, the TypeScript compiler
The Basics: Types for Tooling
The TypeScript Handbook
The TypeScript Handbook
The TypeScript Handbook: About this Handbook
The TypeScript Handbook: Get Started
The TypeScript Handbook: How is this Handbook Structured
Triple-Slash Directives
Triple-Slash Directives
Triple-Slash Directives: /// <amd-dependency />
Triple-Slash Directives: /// <amd-module />
Triple-Slash Directives: /// <reference lib="..." />
Triple-Slash Directives: /// <reference no-default-lib="true"/>
Triple-Slash Directives: /// <reference path="..." />
Triple-Slash Directives: /// <reference types="..." />
Truthiness narrowing
Truthiness narrowing
Truthiness narrowing: Assignments
Truthiness narrowing: Control flow analysis
Truthiness narrowing: Equality narrowing
Truthiness narrowing: instanceof narrowing
Truthiness narrowing: The in operator narrowing
Truthiness narrowing: typeof type guards
Truthiness narrowing: Using type predicates
tsc CLI Options
tsc CLI Options
tsc CLI Options: Compiler Options
tsc CLI Options: Related
tsc CLI Options: Using the CLI
TSConfig Reference
allowJs
allowSyntheticDefaultImports
allowUmdGlobalAccess
allowUnreachableCode
allowUnusedLabels
alwaysStrict
assumeChangesOnlyAffectDirectDependencies
baseUrl
charset
checkJs
composite
declaration
declarationDir
declarationMap
diagnostics
disableFilenameBasedTypeAcquisition
disableReferencedProjectLoad
disableSizeLimit
disableSolutionSearching
disableSourceOfProjectReferenceRedirect
downlevelIteration
emitBOM
emitDeclarationOnly
emitDecoratorMetadata
enable
esModuleInterop
exactOptionalPropertyTypes
exclude
exclude
excludeDirectories
excludeFiles
experimentalDecorators
explainFiles
extendedDiagnostics
extends
fallbackPolling
files
forceConsistentCasingInFileNames
generateCpuProfile
importHelpers
importsNotUsedAsValues
include
include
incremental
inlineSourceMap
inlineSources
isolatedModules
jsx
jsxFactory
jsxFragmentFactory
jsxImportSource
keyofStringsOnly
lib
listEmittedFiles
listFiles
mapRoot
maxNodeModuleJsDepth
module
moduleResolution
newLine
noEmit
noEmitHelpers
noEmitOnError
noErrorTruncation
noFallthroughCasesInSwitch
noImplicitAny
noImplicitOverride
noImplicitReturns
noImplicitThis
noImplicitUseStrict
noLib
noPropertyAccessFromIndexSignature
noResolve
noStrictGenericChecks
noUncheckedIndexedAccess
noUnusedLocals
noUnusedParameters
out
outDir
outFile
paths
plugins
preserveConstEnums
preserveSymlinks
preserveValueImports
preserveWatchOutput
pretty
reactNamespace
references
removeComments
resolveJsonModule
rootDir
rootDirs
skipDefaultLibCheck
skipLibCheck
sourceMap
sourceRoot
strict
strictBindCallApply
strictFunctionTypes
strictNullChecks
strictPropertyInitialization
stripInternal
suppressExcessPropertyErrors
suppressImplicitAnyIndexErrors
synchronousWatchDirectory
target
traceResolution
tsBuildInfoFile
TSConfig Reference
typeRoots
types
useDefineForClassFields
useUnknownInCatchVariables
watchDirectory
watchFile
Type Checking JavaScript Files
Type Checking JavaScript Files
Type Checking JavaScript Files: Classes, functions, and object literals are namespaces
Type Checking JavaScript Files: CommonJS modules are supported
Type Checking JavaScript Files: Constructor functions are equivalent to classes
Type Checking JavaScript Files: Function parameters are optional by default
Type Checking JavaScript Files: null, undefined, and empty array initializers are of type any or any[]
Type Checking JavaScript Files: Object literals are open-ended
Type Checking JavaScript Files: Properties are inferred from assignments in class bodies
Type Checking JavaScript Files: Unspecified type parameters default to any
Type Checking JavaScript Files: Var-args parameter declaration inferred from use of arguments
Type Compatibility
Type Compatibility
Type Compatibility: A Note on Soundness
Type Compatibility: Advanced Topics
Type Compatibility: Any, unknown, object, void, undefined, null, and never assignability
Type Compatibility: Classes
Type Compatibility: Comparing two functions
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 Compatibility: Starting out
Type Compatibility: Subtype vs Assignment
Type Inference
Type Inference
Type Inference: Best common type
Type Inference: Contextual Typing
Typeof Type Operator
Typeof Type Operator
Typeof Type Operator: The typeof type operator
TypeScript for Functional Programmers
TypeScript for Functional Programmers
TypeScript for Functional Programmers: Built-in types
TypeScript for Functional Programmers: Concepts not in Haskell
TypeScript for Functional Programmers: Concepts similar to Haskell
TypeScript for Functional Programmers: Contextual typing
TypeScript for Functional Programmers: Discriminated Unions
TypeScript for Functional Programmers: Gradual typing
TypeScript for Functional Programmers: Module system
TypeScript for Functional Programmers: Next Steps
TypeScript for Functional Programmers: Prerequisites
TypeScript for Functional Programmers: readonly and const
TypeScript for Functional Programmers: Structural typing
TypeScript for Functional Programmers: Type aliases
TypeScript for Functional Programmers: Type Parameters
TypeScript for Functional Programmers: Unions
TypeScript for Functional Programmers: Unit types
TypeScript for Java/C# Programmers
TypeScript for Java/C# Programmers
TypeScript for Java/C# Programmers: Co-learning JavaScript
TypeScript for Java/C# Programmers: Next Steps
TypeScript for Java/C# Programmers: OOP in TypeScript
TypeScript for Java/C# Programmers: Rethinking the Class
TypeScript for Java/C# Programmers: Rethinking Types
TypeScript for JavaScript Programmers
TypeScript for JavaScript Programmers
TypeScript for JavaScript Programmers: Composing Types
TypeScript for JavaScript Programmers: Defining Types
TypeScript for JavaScript Programmers: Next Steps
TypeScript for JavaScript Programmers: Structural Type System
TypeScript for JavaScript Programmers: Types by Inference
TypeScript for the New Programmer
TypeScript for the New Programmer
TypeScript for the New Programmer: Learning JavaScript and TypeScript
TypeScript for the New Programmer: Next Steps
TypeScript for the New Programmer: TypeScript: A Static Type Checker
TypeScript for the New Programmer: What is JavaScript? A Brief History
TypeScript Tooling in 5 minutes
TypeScript Tooling in 5 minutes
TypeScript Tooling in 5 minutes: Building your first TypeScript file
TypeScript Tooling in 5 minutes: Classes
TypeScript Tooling in 5 minutes: Compiling your code
TypeScript Tooling in 5 minutes: Installing TypeScript
TypeScript Tooling in 5 minutes: Interfaces
TypeScript Tooling in 5 minutes: Running your TypeScript web app
TypeScript Tooling in 5 minutes: Type annotations
Using Babel with TypeScript
Using Babel with TypeScript
Using Babel with TypeScript: Babel for transpiling, tsc for types
Using Babel with TypeScript: Babel vs tsc for TypeScript
Utility Types
Utility Types
Utility Types: ConstructorParameters<Type>
Utility Types: Exclude<UnionType, ExcludedMembers>
Utility Types: Extract<Type, Union>
Utility Types: InstanceType<Type>
Utility Types: Intrinsic String Manipulation Types
Utility Types: NonNullable<Type>
Utility Types: Omit<Type, Keys>
Utility Types: OmitThisParameter<Type>
Utility Types: Parameters<Type>
Utility Types: Partial<Type>
Utility Types: Pick<Type, Keys>
Utility Types: Readonly<Type>
Utility Types: Record<Keys, Type>
Utility Types: Required<Type>
Utility Types: ReturnType<Type>
Utility Types: ThisParameterType<Type>
Utility Types: ThisType<Type>
Variable Declaration
Variable Declaration
Variable Declaration: Array destructuring
Variable Declaration: Block-scoped variable capturing
Variable Declaration: Block-scoping
Variable Declaration: const declarations
Variable Declaration: Destructuring
Variable Declaration: Function declarations
Variable Declaration: let declarations
Variable Declaration: let vs. const
Variable Declaration: Object destructuring
Variable Declaration: Re-declarations and Shadowing
Variable Declaration: Scoping rules
Variable Declaration: Spread
Variable Declaration: Tuple destructuring
Variable Declaration: var declarations
Variable Declaration: Variable capturing quirks
What is a tsconfig.json
What is a tsconfig.json
中文
English
A
A
Serif
Sans
White
Sepia
Night
首页
API Docs
工具
首页
API Docs
工具
typescript
/
4.7.2
/
declaration-files
/
Files
File Name
templates/
by-example.html
consumption.html
deep-dive.html
do-s-and-don-ts.html
dts-from-js.html
introduction.html
library-structures.html
publishing.html
templates.html
Name
TypeScript
Version
4.7.2
Badge
Last Updated
2022-05-25T19:39:43Z