diff options
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. |