aboutsummaryrefslogtreecommitdiff
path: root/docs/installation.md
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-02-24 16:33:53 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-24 16:33:53 -0800
commit18362505429f99662f4423264147896d23313dbe (patch)
treef3589c33ca01a3d1118836732f55fc05bf87f30c /docs/installation.md
parent1d85b5efa83a28c46e50ebae041ac480b33fb116 (diff)
downloadbun-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.md20
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.