Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oven-sh/bun-types
TypeScript type definitions for Bun's JavaScript runtime APIs
https://github.com/oven-sh/bun-types
bun dts javascript nodejs types typescript typescript-definitions
Last synced: 6 days ago
JSON representation
TypeScript type definitions for Bun's JavaScript runtime APIs
- Host: GitHub
- URL: https://github.com/oven-sh/bun-types
- Owner: oven-sh
- Archived: true
- Created: 2022-07-27T04:49:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-14T23:59:57.000Z (about 2 years ago)
- Last Synced: 2025-01-11T10:22:37.352Z (12 days ago)
- Topics: bun, dts, javascript, nodejs, types, typescript, typescript-definitions
- Language: TypeScript
- Homepage: https://bun.sh
- Size: 3.36 MB
- Stars: 76
- Watchers: 3
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### 🚧 Moved to [`packages/bun-types`](https://github.com/oven-sh/bun/tree/main/packages/bun-types) 🚧
---
These are the type definitions for Bun's JavaScript runtime APIs.
# Installation
Install the `bun-types` npm package:
```bash
# 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`:
```jsonc
{
"compilerOptions": {
"lib": ["ESNext"],
"module": "esnext",
"target": "esnext",
// "bun-types" is the important part
"types": ["bun-types"]
}
}
```# Contributing
`bun-types` is generated via [./bundle.ts](./scripts/bundle.ts).
## Adding a new file
1. Add it to [./index.d.ts](./index.d.ts)
## How to generate types.d.ts
[`./bundle.ts`](./bundle.ts) merges the types in this folder into a single file.
To run it:
```bash
bun generate:package
```# Generated docs
**[📚 See here for docs](https://oven-sh.github.io/bun-types/)**