diff options
author | 2023-02-24 16:33:53 -0800 | |
---|---|---|
committer | 2023-02-24 16:33:53 -0800 | |
commit | 18362505429f99662f4423264147896d23313dbe (patch) | |
tree | f3589c33ca01a3d1118836732f55fc05bf87f30c /docs/installation.md | |
parent | 1d85b5efa83a28c46e50ebae041ac480b33fb116 (diff) | |
download | bun-18362505429f99662f4423264147896d23313dbe.tar.gz bun-18362505429f99662f4423264147896d23313dbe.tar.zst bun-18362505429f99662f4423264147896d23313dbe.zip |
Docs tweaks (#2160)
* Tweaks
* Add ecosystem. Add bunx. Flesh out install.
* Tweaks
* Add TS to installation
* Tweaks
* New readme
* Write new readme
* Tweak
* Center header
* Bun
* tweaks
* No dollar sign
* Fix links
* Update
* Tweak
Diffstat (limited to 'docs/installation.md')
-rw-r--r-- | docs/installation.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/installation.md b/docs/installation.md index 48d3e188c..b0cc07456 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -93,6 +93,26 @@ $ docker run --rm --init --ulimit memlock=-1:-1 oven/bun:edge this is some output ``` --> +## TypeScript + +To install TypeScript definitions for Bun's built-in APIs in your project, install `bun-types`. + +```sh +$ bun add -d bun-types # dev dependency +``` + +Then include `"bun-types"` in the `compilerOptions.types` in your `tsconfig.json`: + +```json-diff + { + "compilerOptions": { ++ "types": ["bun-types"] + } + } +``` + +Refer to [Ecosystem > TypeScript](/docs/ecosystem/typescript) for a complete guide to TypeScript support in Bun. + ## Completions Shell auto-completion should be configured automatically when Bun is installed. |