Skip to main content
TypeScript
  • Download
  • Docs
  • Handbook
  • Community
  • Playground
  • Tools
This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more
    • TS for the New Programmer
    • TS for JS Programmers
    • TS for OOP Programmers
    • TS for Functional Programmers
    • Tooling in 5 minutes
    • What is the Handbook?
    • Basic Types
    • Interfaces
    • Functions
    • Literal Types
    • Unions and Intersections
    • Classes
    • Enums
    • Generics
    • Advanced Types
    • Declaration Merging
    • Decorators
    • Global Utility Types
    • Iterators and Generators
    • JSDoc Supported Types
    • JSX
    • Mixins
    • Modules
    • Module Resolution
    • Namespaces
    • Namespaces and Modules
    • Symbols
    • Triple-Slash Directives
    • Type Compatibility
    • Type Inference
    • Type Checking JavaScript Files
    • TypeScript & the DOM
    • Variable Declarations
    • ASP.NET Core
    • Gulp
    • Migrating from JavaScript
    • Overview
    • TypeScript 3.9
    • TypeScript 3.8
    • TypeScript 3.7
    • TypeScript 3.6
    • TypeScript 3.5
    • TypeScript 3.4
    • TypeScript 3.3
    • TypeScript 3.2
    • TypeScript 3.1
    • TypeScript 3.0
    • TypeScript 2.9
    • TypeScript 2.8
    • TypeScript 2.7
    • TypeScript 2.6
    • TypeScript 2.5
    • TypeScript 2.4
    • TypeScript 2.3
    • TypeScript 2.2
    • TypeScript 2.1
    • TypeScript 2.0
    • TypeScript 1.8
    • TypeScript 1.7
    • TypeScript 1.6
    • TypeScript 1.5
    • TypeScript 1.4
    • TypeScript 1.3
    • TypeScript 1.1
    • Introduction
    • Library Structures
    • Template: Global Module
    • Template: Global Extends
    • Template: Module
    • Template: Plugin
    • Template: Class
    • Template: Function
    • By Example
    • Do's and Don'ts
    • DTS files from JS files
    • Deep Dive
    • Templates
    • Publishing
    • Consumption
    • TSConfig Reference
    • The tsconfig.json
    • CLI Options
    • Project References
    • Compiler Options in MSBuild
    • Integrating with Build Tools
    • Configuring Watch Mode
    • Nightly Builds

Templates

global-modifying-module.d.ts

  • global-plugin.d.ts
  • global.d.ts
  • module-class.d.ts
  • module-function.d.ts
  • module-plugin.d.ts
  • module.d.ts
Previous

Deep Dive

How do d.ts files work, a deep dive

Next

Publishing

How to get your d.ts files to users

The TypeScript docs are an open source project. Help us improve these pages by sending a Pull Request ❤

Contributors to this page:

MHMohamed Hegazy  (53)
OTOrta Therox  (10)
1+

Last updated: Jun 26, 2020

Popular Documentation Pages

  • Basic Types

    JavaScript primitive types inside TypeScript

  • Advanced Types

    TypeScript language extensions to JavaScript

  • Functions

    How to provide types to functions in JavaScript

  • Interfaces

    How to provide a type shape to JavaScript objects

  • Variable Declarations

    How to create and type JavaScript variables

  • TypeScript in 5 minutes

    An overview of building a TypeScript web app

  • TSConfig Options

    JavaScript primitive types inside TypeScript

  • Classes

    How to provide types to JavaScript ES6 classes

Made with ♥ in Redmond, Boston, SF & NYC

Microsoft Logo

© 2012-2020 Microsoft
Privacy

Using TypeScript

  • Get Started
  • Download
  • Community
  • Playground
  • TSConfig Ref
  • Why TypeScript
  • Design
  • Code Samples

    See how TypeScript improves day to day working with JavaScript with minimal additional syntax.

    JavaScript Essentials

    1. Hello World
    2. Objects and Arrays
    3. Functions
    4. Code Flow

    Functions with JavaScript

    1. Generic Functions
    2. Typing Functions
    3. Function Chaining

    Working With Classes

    1. Classes 101
    2. This
    3. Generic Classes
    4. Mixins

    Modern JavaScript

    1. Async Await
    2. Immutability
    3. Import Export
    4. JSDoc Support

    External APIs

    1. TypeScript with Web
    2. TypeScript with React
    3. TypeScript with Deno
    4. TypeScript with Node
    5. TypeScript with WebGL

    Helping with JavaScript

    1. Quick Fixes
    2. Errors

    Explore how TypeScript extends JavaScript to add more safety and tooling.

    Primitives

    1. Any
    2. Literals
    3. Union and Intersection Types
    4. Unknown and Never

    Type Primitives

    1. Tuples
    2. Built-in Utility Types
    3. Nullable Types

    Meta-Types

    1. Conditional Types
    2. Discriminate Types
    3. Indexed Types
    4. Mapped Types

    Language

    1. Soundness
    2. Structural Typing
    3. Type Guards
    4. Type Widening and Narrowing

    Language Extensions

    1. Enums
    2. Nominal Typing
    3. Types vs Interfaces

Community

  • Get Help
  • Blog
  • GitHub Repo
  • Community Chat
  • @TypeScript
  • Stack Overflow