Files
bun.sh/packages/bun-types
2023-04-12 18:41:40 -07:00
..
2023-02-02 17:29:10 -08:00
2023-02-07 04:47:36 -08:00
2022-12-06 18:48:02 -08:00
2023-02-06 21:36:36 -08:00
2023-01-11 14:56:41 -08:00
2023-03-22 15:01:01 -07:00
2023-03-22 15:01:01 -07:00
2023-01-11 14:56:41 -08:00
2023-01-11 14:56:41 -08:00
2023-02-06 21:36:36 -08:00
2023-03-03 14:24:12 -08:00
2023-03-22 15:01:01 -07:00
2023-02-02 17:29:10 -08:00
2023-02-22 17:45:22 -08:00
2023-01-11 14:56:41 -08:00
2023-02-06 21:36:36 -08:00
2023-02-06 21:36:36 -08:00
2023-01-11 14:56:41 -08:00

Bun TypeScript type definitions

Logo

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

Installation

Install the bun-types npm package:

# yarn/npm/pnpm work too, "bun-types" is an ordinary npm package
bun add bun-types

Usage

Add this to your tsconfig.json or jsconfig.json:

  {
    "compilerOptions": {
      // ...
+     "types": ["bun-types"]
    }
  }

Contributing

bun-types is generated via ./bundle.ts.

Adding a new file

  1. Add it to ./index.d.ts

How to generate types.d.ts

./bundle.ts merges the types in this folder into a single file.

To run it:

bun build

Generated docs

📚 See here for docs