@aphrody/bun-types

中文文档
1.4.7发布于 2026/10/23MITTypeScript近 30 天下载 2295

Type definitions and documentation for Bun, an incredibly fast JavaScript runtime

原始使用文档

TypeScript types for Bun

Logo

These are the type definitions for Bun's JavaScript runtime APIs.

Installation

Install the @aphrody/bun-types npm package:

# yarn/npm/pnpm work too
bun add -D @aphrody/bun-types

TypeScript only auto-loads @types/* packages, so list it in compilerOptions.types in your tsconfig.json:

{
  "compilerOptions": {
    "types": ["@aphrody/bun-types"]
  }
}

The Bun global and all bun:* modules are then available.

Contributing

The @aphrody/bun-types package lives in this repo under packages/bun-types. (Upstream, the @types/bun package is a shim that loads bun-types.)

To add a new file, add it under packages/bun-types. Then add a triple-slash directive pointing to it inside ./index.d.ts.

+ /// <reference path="./newfile.d.ts" />
bun build

版本与发布记录

@aphrody/bun-types 共发布 12 个版本,首次发布于 2026/10/09;过去 12 个月发布了 12 个版本。

版本发布日期距今
1.4.7latest2026/10/2315 天前
1.4.6-aphrody.32026/10/1820 天前
1.4.6-aphrody.22026/10/1820 天前
1.4.6-aphrody.12026/10/1721 天前
1.4.4-aphrody.22026/10/1424 天前
1.4.4-aphrody.12026/10/1127 天前

关于 @aphrody/bun-types 的常见问题

@aphrody/bun-types 是什么?

Type definitions and documentation for Bun, an incredibly fast JavaScript runtime

如何安装 @aphrody/bun-types?

在项目目录运行 npm install @aphrody/bun-types,或使用 pnpm add / yarn add / bun add。

@aphrody/bun-types 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aphrody/bun-types 可以商用吗?

@aphrody/bun-types 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aphrody/bun-types 的下载量有多少?

根据 npm 官方下载统计,@aphrody/bun-types 在 2026/10/06 – 2026/11/04 这 30 天内被下载 2,295 次,日均约 77 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aphrody/bun-types 还在维护吗?

最新版本 1.4.7 发布于 2026/10/23(15 天前);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/10/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。