# bun-types

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

Latest version **1.4.2** (published 2026-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install bun-types
pnpm add bun-types
yarn add bun-types
bun add bun-types
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.4.2 |
| Published | 2026-09-05 |
| First published | 2022-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 95904 |
| Maintainers | jarred, robobun, colinhacks |
| Keywords | bun, bun.js, types |

## Links

- npm: https://www.npmjs.com/package/bun-types
- Repository: https://github.com/oven-sh/bun
- Homepage: https://bun.com
- Issues: https://github.com/oven-sh/bun/issues
- npm.io page: https://npm.io/package/bun-types

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.4.2 (latest) — 2026-09-05
- 1.4.3-canary.20261004T153457 (canary) — 2026-10-04
- 1.4.3-canary.20261003T145752 — 2026-10-03
- 1.4.3-canary.20261002T141526 — 2026-10-02
- 1.4.3-canary.20261001T141542 — 2026-10-01
- 1.4.3-canary.20260930T141541 — 2026-09-30
- 1.4.3-canary.20260929T141505 — 2026-09-29
- 1.4.3-canary.20260928T141549 — 2026-09-28
- 1.4.3-canary.20260927T141236 — 2026-09-27
- 1.4.3-canary.20260926T141154 — 2026-09-26
- 1.4.3-canary.20260925T141540 — 2026-09-25
- 1.4.3-canary.20260924T141551 — 2026-09-24
- 1.4.3-canary.20260923T141530 — 2026-09-23
- 1.4.3-canary.20260922T141420 — 2026-09-22
- 1.4.3-canary.20260921T141613 — 2026-09-21
- … 1321 more at https://npm.io/package/bun-types/versions

## README

# TypeScript types for Bun

<p align="center">
  <a href="https://bun.com"><img src="https://bun.com/logo@2x.png" alt="Logo"></a>
</p>

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

# Installation

Install the `@types/bun` npm package:

```bash
# yarn/npm/pnpm work too
# @types/bun is an ordinary npm package
bun add -D @types/bun
```

That's it! VS Code and TypeScript automatically load `@types/*` packages into your project, so the `Bun` global and all `bun:*` modules should be available immediately.

# Contributing

The `@types/bun` package is a shim that loads `bun-types`. The `bun-types` package lives in the Bun repo under `packages/bun-types`.

To add a new file, add it under `packages/bun-types`. Then add a [triple-slash directive](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html) pointing to it inside [./index.d.ts](./index.d.ts).

```diff
+ /// <reference path="./newfile.d.ts" />
```

```bash
bun build
```

---
_Source: https://npm.io/package/bun-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
