Files
bun.sh/packages/bun-types
Ciro Spaciari efd33c398f enhancement(fetch): Merge parameters from request parameter with the second parameter for fetch, move verbose and proxy options to second parameter, add non-TLS tests for fetch (#1862)
* initial steps for proxy-server

* added http_proxy in fetch, move 3rd argument to 3nd argument options, add some non-TLS proxy tests

* some changes

* use only 1 buffer for url+proxy, merge headers on fetch

* initial steps

* change back to override headers instead of merging in fetch

* fix build response.zig

* fix conditional in merged headers on fetch

* updated with main and make proxy disabled if null is passed

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-01-23 14:38:40 -08:00
..
2023-01-22 14:31:08 -08:00
2023-01-16 11:58:57 -08:00
2023-01-17 23:06:26 -08:00
2022-12-06 18:48:02 -08:00
2023-01-11 14:56:41 -08:00
2023-01-09 08:25:39 -08:00
2022-12-06 18:48:02 -08:00
2023-01-11 14:56:41 -08:00
2023-01-11 14:56:41 -08:00
2023-01-22 14:31:08 -08:00
2022-12-31 23:03:45 -08:00
2023-01-11 14:56:41 -08:00
2022-12-13 20:47:51 -08:00
2023-01-16 11:58:57 -08:00
2023-01-11 14:56:41 -08:00
2023-01-11 14:56:41 -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": {
    "lib": ["esnext"],
    "module": "esnext",
    "target": "esnext",
    "moduleResolution": "node",
    // "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 build

Generated docs

📚 See here for docs