Type alias TaskWorkerParamsT<T>

TaskWorkerParamsT<T>: T | undefined

The type of the task worker parameters.

Type Parameters

  • T extends unknown[]

    The type of the task worker parameters.

Example

Use to define task worker parameters.

const moviesGetterParams: TaskWorkerParamsT<[url: string]> = ["example.com"];

Example

Use to create a template for similar task worker parameters.

type TwoNumbersWorkerParamsTemplate = TaskWorkerParamsT<[number, number]>;
const adderParams: TwoNumbersWorkerParamsTemplate = [1, 2];
const multiplierParams: TwoNumbersWorkerParamsTemplate = [3, 4];

Generated using TypeDoc