📄 index.ts
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 3 |
📦 Imports | 7 |
📐 Interfaces | 1 |
📑 Type Aliases | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/core/useWebWorker/index.ts
📦 Imports¶
Name | Source |
---|---|
Ref |
vue |
ShallowRef |
vue |
ConfigurableWindow |
../_configurable |
tryOnScopeDispose |
@vueuse/shared |
deepRef |
vue |
shallowRef |
vue |
defaultWindow |
../_configurable |
Functions¶
useWebWorker(url: string, workerOptions: WorkerOptions, options: ConfigurableWindow): UseWebWorkerReturn<T>
¶
Code
-
JSDoc:
-
Parameters:
url: string
workerOptions: WorkerOptions
options: ConfigurableWindow
- Return Type:
UseWebWorkerReturn<T>
post(args: any[]): void
¶
Code
- Parameters:
args: any[]
- Return Type:
void
- Calls:
worker.value.postMessage
terminate(): void
¶
- Return Type:
void
- Calls:
worker.value.terminate
Interfaces¶
UseWebWorkerReturn<Data = any>
¶
Interface Code
Properties¶
Name | Type | Optional | Description |
---|---|---|---|
data |
Ref<Data> |
✗ | |
post |
PostMessage |
✗ | |
terminate |
() => void |
✗ | |
worker |
ShallowRef<Worker | undefined> |
✗ |