📄 useWebWorker¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 3 |
| 📦 Imports | 5 |
| 📐 Interfaces | 1 |
| 📑 Type Aliases | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/core/useWebWorker/index.ts
📦 Imports¶
| Name | Source |
|---|---|
ShallowRef |
vue |
ConfigurableWindow |
../_configurable |
tryOnScopeDispose |
@vueuse/shared |
shallowRef |
vue |
defaultWindow |
../_configurable |
Functions¶
useWebWorker(url: string, workerOptions: WorkerOptions, options: ConfigurableWindow): UseWebWorkerReturn<T>¶
Simple Web Workers registration and communication.
Parameters:
urlany: No descriptionworkerOptionsany: No descriptionoptionsany: No description
See: https://vueuse.org/useWebWorker
Raw JSDoc
Code
Internal helpers¶
Declared inside another function in this file.
post(args: any[]): void¶
Parameters:
argsany[]
Returns: void
Calls:
worker.value.postMessage
Code
terminate(): void¶
Returns: void
Calls:
worker.value.terminate
Interfaces¶
UseWebWorkerReturn<Data = any>¶
Interface Code
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
data |
ShallowRef<Data> |
✗ | not shown |
post |
PostMessage |
✗ | not shown |
terminate |
() => void |
✗ | not shown |
worker |
ShallowRef<Worker \| undefined> |
✗ | not shown |
Type Aliases¶
PostMessage¶
WorkerFn¶
Generated by Syntax Scribe