Skip to content

Classes

Worker

Defined in: worker.ts:17

Basically just a queue of unpack requests, to keep them throttled to a reasonable amount of parallelism

Constructors

new Worker()
new Worker(onMessage): Worker

Defined in: worker.ts:20

Parameters
onMessage

(m) => void

Returns

Worker

Properties

onMessage()
onMessage: (m) => void;

Defined in: worker.ts:18

Parameters
m

ResponseError | ResponseOK

Returns

void

Methods

process()
process(req): Promise<void>

Defined in: worker.ts:24

Parameters
req

UnpackRequest

Returns

Promise<void>

Type Aliases

ResponseError

type ResponseError = object

Defined in: worker.ts:4

Type declaration

error
error: unknown
id
id: number

ResponseOK

type ResponseOK = object

Defined in: worker.ts:5

Type declaration

id
id: number
ok
ok: true

Functions

isResponseOK()

function isResponseOK(o): o is ResponseOK

Defined in: worker.ts:10

Parameters

o

unknown

Returns

o is ResponseOK

References

Pool

Re-exports Pool

unpack

Re-exports unpack

UnpackRequest

Re-exports UnpackRequest