Type alias TaskFunction<Data, Response>

Task 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.