aboutsummaryrefslogtreecommitdiff
path: root/docs/quickstart.md
diff options
context:
space:
mode:
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 %}