Documentation / @warp-drive/experiments / worker-fetch / WorkerFetch
Class: WorkerFetch
Defined in: data-worker/fetch.ts:49
Constructors
Constructor
ts
new WorkerFetch(worker): WorkerFetch;Defined in: data-worker/fetch.ts:55
Parameters
worker
null | Worker | SharedWorker
Returns
WorkerFetch
Methods
cleanupRequest()
ts
cleanupRequest(id): undefined | PendingItem;Defined in: data-worker/fetch.ts:107
Parameters
id
number
Returns
undefined | PendingItem
request()
ts
request<T>(context, next):
| Promise<T>
| Future<T>;Defined in: data-worker/fetch.ts:123
Type Parameters
T
T
Parameters
context
next
NextFn<T>
Returns
send()
ts
send(event): void;Defined in: data-worker/fetch.ts:118
Parameters
event
RequestEventData | AbortEventData
Returns
void
Properties
channel
ts
channel: MessageChannel;Defined in: data-worker/fetch.ts:53
pending
ts
pending: Map<number, PendingItem>;Defined in: data-worker/fetch.ts:52
threadId
ts
threadId: string;Defined in: data-worker/fetch.ts:51
worker
ts
worker:
| Worker
| SharedWorker;Defined in: data-worker/fetch.ts:50