跳转到内容
TypeScript
  • 下载
  • 文档
  • 手册
  • 社区
  • 演练场
  • 工具
in En
  • Playground
  • 配置

    配置

  • 示例

    了解 TypeScript 如何使用最少的附加语法改善 JavaScript 的日常使用。

    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

    探索 TypeScript 如何扩展 JavaScript,使其更安全,更便利。

    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
  • Help
  • Settings

正在下载 TypeScript...

  • 版本......
    • 运行
    • 导出
      • Tweet link to Playground
      • 复制为 Markdown 格式的 issue 模板
      • 复制为 Markdown 格式的链接
      • 复制为 Markdown 格式可预览的链接
      • 在 TypeScript AST 查看器中打开
      • 在 Bug Workbench 中打开
      • Open in VSCode TS Playground (alpha)
      • 在 CodeSandbox 中打开
      • 在 StackBlitz 中打开
    • Share
    • ⇥

    自定义

    热门文档页面

    • 常见类型

      TypeScript 中所有常见的类型

    • 用现有类型创建新类型

      用于优雅地创建类型的技术

    • 函数进阶

      在 JavaScript 中为函数添加类型

    • 对象进阶

      为 JavaScript 对象添加类型

    • 缩小类型

      TypeScript 通过运行时行为推断类型

    • 变量声明

      如何创建 JavaScript 变量并给它添加类型

    • 5 分钟速成 TypeScript

      构建 TypeScript web 应用程序概述

    • TSConfig 选项

      项目的所有配置选项

    • 类

      给 JavaScript ES6 类添加类型

    在雷德蒙德、波士顿、旧金山和都柏林,用 ♥ 共同创造

    Microsoft Logo

    © 2012-2025 微软
    隐私政策Terms of Use

    使用 TypeScript

    • 开始
    • 下载
    • 社群
    • 演练场
    • TSConfig 参考
    • 代码示例
    • 为何选择 TypeScript
    • 设计

    社区

    • 获取帮助
    • 博客
    • GitHub 仓库
    • 社群交流
    • @TypeScript
    • Mastodon
    • Stack Overflow
    • 中文文档仓库

    MSG