Type Alias TaskSyncFunction<Data, Response>

TaskSyncFunction<Data, Response>: ((data?: Data) => Response)

Task synchronous function that can be executed.

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?): Response
    • Parameters

      • Optionaldata: Data

        Data sent to the worker.

      Returns Response

      Execution response.