bun-types 0.1.5 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +54 -0
  2. package/package.json +5 -4
  3. package/types.d.ts +19025 -18533
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # Bun TypeScript type definitions
2
+
3
+ <p align="center">
4
+ <a href="https://bun.sh"><img src="https://bun.sh/logo@2x.png" alt="Logo"></a>
5
+ </p>
6
+
7
+ These are the type definitions for Bun's JavaScript runtime APIs.
8
+
9
+ # Installation
10
+
11
+ Install the `bun-types` npm package:
12
+
13
+ ```bash
14
+ # yarn/npm/pnpm work too, "bun-types" is an ordinary npm package
15
+ bun add bun-types
16
+ ```
17
+
18
+ # Usage
19
+
20
+ Add this to your `tsconfig.json` or `jsconfig.json`:
21
+
22
+ ```jsonc
23
+ {
24
+ "compilerOptions": {
25
+ "lib": ["ESNext"],
26
+ "module": "esnext",
27
+ "target": "esnext",
28
+ // "bun-types" is the important part
29
+ "types": ["bun-types"]
30
+ }
31
+ }
32
+ ```
33
+
34
+ # Contributing
35
+
36
+ `bun-types` is generated via [./bundle.ts](./scripts/bundle.ts).
37
+
38
+ ## Adding a new file
39
+
40
+ 1. Add it to [./index.d.ts](./index.d.ts)
41
+
42
+ ## How to generate types.d.ts
43
+
44
+ [`./bundle.ts`](./bundle.ts) merges the types in this folder into a single file.
45
+
46
+ To run it:
47
+
48
+ ```bash
49
+ bun generate:package
50
+ ```
51
+
52
+ # Generated docs
53
+
54
+ **[📚 See here for docs](https://oven-sh.github.io/bun-types/)**
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "bun-types",
3
- "version": "0.1.5",
4
- "description": "Type definitions for bun.js",
3
+ "version": "0.1.11",
4
+ "description": "Type definitions for Bun, an incredibly fast JavaScript runtime",
5
5
  "types": "types.d.ts",
6
6
  "files": [
7
- "types.d.ts"
7
+ "types.d.ts",
8
+ "README.md"
8
9
  ],
9
10
  "private": false,
10
11
  "keywords": [
@@ -12,6 +13,6 @@
12
13
  "bun.js",
13
14
  "types"
14
15
  ],
15
- "repository": "https://github.com/oven-sh/bun",
16
+ "repository": "https://github.com/oven-sh/bun-types",
16
17
  "homepage": "https://bun.sh"
17
18
  }