Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
/ bun-types Public archive

TypeScript type definitions for Bun's JavaScript runtime APIs

Notifications You must be signed in to change notification settings

oven-sh/bun-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2409a9a Β· Dec 14, 2022
Dec 10, 2022
Aug 7, 2022
Jul 31, 2022
Aug 7, 2022
Oct 9, 2022
Oct 27, 2022
Jul 31, 2022
Jul 31, 2022
Jul 27, 2022
Jul 31, 2022
Oct 27, 2022
Dec 14, 2022
Jul 27, 2022
Jul 27, 2022
Sep 4, 2022
Nov 19, 2022
Aug 7, 2022
Jul 27, 2022
Jul 27, 2022
Jul 27, 2022
Jul 27, 2022
Nov 19, 2022
Jul 31, 2022
Oct 27, 2022
Jul 27, 2022
Jul 27, 2022
Jul 27, 2022
Jul 28, 2022
Jul 27, 2022
Jul 27, 2022
Sep 4, 2022
Jul 27, 2022
Aug 7, 2022
Jul 27, 2022
Jul 27, 2022
Jul 27, 2022
Jul 27, 2022
Oct 27, 2022
Jul 27, 2022
Jul 27, 2022
Jul 27, 2022
Aug 7, 2022
Jul 28, 2022
Jul 27, 2022
Aug 7, 2022
Jul 27, 2022
Jul 27, 2022
Jul 27, 2022

Repository files navigation

🚧 Moved to packages/bun-types 🚧


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": {
    "lib": ["ESNext"],
    "module": "esnext",
    "target": "esnext",
    // "bun-types" is the important part
    "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 generate:package

Generated docs

πŸ“š See here for docs