Files
bun.sh/types/bun
thislooksfun e9f376825c docs: fix documentation of atob and btoa (#748)
These function are confusingly named. `btoa` converts "Binary" to Ascii
by encoding the input using base64. `atob` reverses that process by
base64 decoding the Ascii input into a "Binary" output.

The names come from the Unix utilities with the same names, which
"converts a binary file to ascii for transmission over a telephone line"
(https://www.unix.com/man-page/minix/1/btoa/)

See:
- https://developer.mozilla.org/en-US/docs/Web/API/atob
- https://developer.mozilla.org/en-US/docs/Web/API/btoa
- https://html.spec.whatwg.org/multipage/webappapis.html#dom-btoa-dev

Note: the actual implementation of `btoa` and `atob` are correct, but
the docs were backwards.
2022-07-16 15:23:18 -07:00
..
2022-07-12 16:43:08 +02:00
2022-04-10 05:23:02 -07:00
2022-07-07 20:22:51 -07:00
2022-04-10 04:24:24 -07:00
2022-04-10 04:24:24 -07:00
2022-07-07 20:22:51 -07:00

Bun type definitions

This has type definitions for Bun.js APIs. The type definitions are merged into a single file and copied to ../../packages/bun-types/types.d.ts.

Adding a new file

  1. Add it to ./index.d.ts
  2. Add it to ./paths.txt

How to generate types.d.ts

./bundle.ts merges the types in this folder into a single file.

To run it:

bun ./bundle.ts ../../packages/bun-types