aboutsummaryrefslogtreecommitdiff
path: root/docs/quickstart.md
diff options
context:
space:
mode:
authorGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-17 14:10:25 -0700
committerGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-17 14:10:25 -0700
commit7458b969c5d9971e89d187b687e1924e78da427e (patch)
treeee3dbf95c728cf407bf49a27826b541e9264a8bd /docs/quickstart.md
parentd4a2c29131ec154f5e4db897d4deedab2002cbc4 (diff)
parente91436e5248d947b50f90b4a7402690be8a41f39 (diff)
downloadbun-7458b969c5d9971e89d187b687e1924e78da427e.tar.gz
bun-7458b969c5d9971e89d187b687e1924e78da427e.tar.zst
bun-7458b969c5d9971e89d187b687e1924e78da427e.zip
Merge branch 'main' into postinstall_3
Diffstat (limited to 'docs/quickstart.md')
-rw-r--r--docs/quickstart.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/docs/quickstart.md b/docs/quickstart.md
index ea36a961f..ae7fc6087 100644
--- a/docs/quickstart.md
+++ b/docs/quickstart.md
@@ -42,6 +42,22 @@ const server = Bun.serve({
console.log(`Listening on http://localhost:${server.port} ...`);
```
+If you're using TypeScript, you may see a type error on the `Bun` global. To fix this, install `bun-types`.
+
+```sh
+$ bun add -d bun-types
+```
+
+Then add the following line to your `compilerOptions` in `tsconfig.json`.
+
+```json-diff#tsconfig.json
+{
+ "compilerOptions": {
++ "types": ["bun-types"]
+ }
+}
+```
+
Run the file from your shell.
```bash
@@ -74,7 +90,7 @@ Then run it with `bun run start`.
```bash
$ bun run start
$ bun run index.ts
- Listening on http://localhost:4000...
+ Listening on http://localhost:3000 ...
```
{% callout %}