bun-types
Advanced tools
Comparing version 0.6.0-canary.20230415T004546 to 0.6.0-canary.20230426T215435
{ | ||
"name": "bun-types", | ||
"version": "0.6.0-canary.20230415T004546", | ||
"version": "0.6.0-canary.20230426T215435", | ||
"description": "Type definitions for Bun, an incredibly fast JavaScript runtime", | ||
@@ -8,3 +8,4 @@ "types": "types.d.ts", | ||
"types.d.ts", | ||
"README.md" | ||
"README.md", | ||
"tsconfig.json" | ||
], | ||
@@ -11,0 +12,0 @@ "private": false, |
@@ -1,2 +0,2 @@ | ||
# Bun TypeScript type definitions | ||
# TypeScript types for Bun | ||
@@ -24,6 +24,6 @@ <p align="center"> | ||
{ | ||
"compilerOptions": { | ||
// ... | ||
+ "types": ["bun-types"] | ||
} | ||
+ "types": ["bun-types"], | ||
// other options... | ||
} | ||
@@ -34,20 +34,14 @@ ``` | ||
`bun-types` is generated via [./bundle.ts](./scripts/bundle.ts). | ||
`bun-types` is generated via [./scripts/bundle.ts](./scripts/bundle.ts). | ||
## Adding a new file | ||
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). | ||
1. Add it to [./index.d.ts](./index.d.ts) | ||
```diff | ||
+ /// <reference path="./newfile.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: | ||
[`./bundle.ts`](./bundle.ts) merges the types in this folder into a single file. | ||
To run it: | ||
```bash | ||
bun build | ||
``` | ||
# Generated docs | ||
**[📚 See here for docs](https://oven-sh.github.io/bun-types/)** |
Sorry, the diff of this file is too big to display
1248902
4
34951
46