Type alias WorkerFunction<Data, Response>

WorkerFunction<Data, Response>: WorkerSyncFunction<Data, Response> | WorkerAsyncFunction<Data, Response>

Worker function that can be executed. This function can be synchronous or asynchronous.

Type Parameters

  • Data = unknown

    Type of data sent to the worker. This can only be structured-cloneable data.

  • Response = unknown

    Type of execution response. This can only be structured-cloneable data.

Generated using TypeDoc