@osaedasia/oresume
Version:
A user-friendly library for generating complete Single Page Applications (SPAs)
28 lines (27 loc) • 1.11 kB
TypeScript
import { ITaskService } from "../../domain/definitions/interfaces/ITaskService";
/**
* Represents an asynchronous task utilizing Web Workers for parallel execution.
* Manages long-running operations without blocking the main thread.
* @template TInput The type of input data for the task.
* @template TOutput The type of output data produced by the task.
*/
export declare class Task<TInput, TOutput> {
/**
* Service instance handling task-related operations.
*/
private readonly _taskService;
/**
* Indicates whether Web Workers are supported in the current environment.
*/
private readonly _isWorkerAvailable;
/**
* Creates a new Task instance with the specified worker script.
* @param {URL} workerScriptPath URL pointing to the Web Worker script.
* @throws {WebWorkerNotSupportedError} If Web Workers are not supported in the current environment.
*/
constructor(workerScriptPath: URL);
/**
* @returns {ITaskService<TInput, TOutput>} The underlying task service instance.
*/
get service(): ITaskService<TInput, TOutput>;
}