Skip to content

Commit bae79d9

Browse files
leo-arjrf0110
authored andcommitted
Add note about adding WebWorker to tsconfig
1 parent ee06574 commit bae79d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Just supply an empty import in one of your source files to receive the workers t
1616
import {} from '@cloudflare/workers-types'
1717
```
1818

19+
Make sure that the `WebWorker` library is included in [`tsconfig`](https://www.typescriptlang.org/v2/en/tsconfig#lib). e.g.: `"lib": ["WebWorker"] // As well as "DOM", "ESNext", etc.`. `@cloudflare/workers-types` definitions are merged with `WebWorker`.
20+
21+
1922
### Using a KV namespace
2023

2124
It's recommended that you create an ambient type file for your KV namespace bindings. Create a file named `types.d.ts` in your src directory:

0 commit comments

Comments
 (0)