Type alias TaskAsyncFunction<Data, Response>

TaskAsyncFunction<Data, Response>: ((data?) => Promise<Response>)

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.

Type declaration

    • (data?): Promise<Response>
    • Task asynchronous function that can be executed. This function must return a promise.

      Parameters

      • Optional data: Data

      Returns Promise<Response>

Generated using TypeDoc