You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/usage.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -169,8 +169,7 @@ Bundle this module and you will obtain a stand-alone bundle that has its worker
169
169
### createWorker - select worker backend
170
170
`createWorker` allows selecting the worker backend (among web, node, and tiny), and also if you want a blob worker.
171
171
172
-
The second argument to the `createWorker` is an object that specifies `backend: 'web' | 'node' | 'tiny'` and `blob: boolean`.
173
-
You can also pass other `WorkerOptions` in this object.
172
+
The second required argument to the `createWorker` is a string that specifies `backend: 'web' | 'node' | 'tiny'`. The third optional argument is an object that can be used to specify `blob: boolean` or other `WorkerOptions`.
174
173
175
174
`createWorker` uses dynamic imports to only import the needed implementation, so you can import the needed functions directly to reduce the bundle size.
176
175
@@ -179,7 +178,7 @@ import { createWorker } from "threads/createWorker"
0 commit comments