Type alias TaskFunctions<Data, Response>

TaskFunctions<Data, Response>: Record<string, TaskFunction<Data, Response> | TaskFunctionObject<Data, Response>>

Tasks functions that can be executed. The key is the name of the task function or task function object. The value is the task function or task function object.

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.