Skip to main content
On this page

deno types

deno types 会打印所有 Deno 特有 API 的 TypeScript 类型声明。 这对需要 Deno 类型信息的编辑器和工具很有用。

基本用法 Jump to heading

将类型声明打印到标准输出:

>_
deno types

保存到文件以供编辑器或类型检查器使用:

>_
deno types > deno.d.ts

何时使用 Jump to heading

大多数带有 Deno 扩展 的编辑器会自动处理类型。 如果你属于以下情况,可能需要使用 deno types

  • 使用不支持 Deno LSP 的编辑器
  • 为构建流水线生成类型声明
  • 查看当前 Deno 版本可用哪些 API
Command line usage:
deno types [OPTIONS]

Print runtime TypeScript declarations.

deno types > lib.deno.d.ts

The declaration file could be saved and used for typing information.

Last updated on

你找到了你需要的东西吗?

编辑此页面
隐私政策