@toreda/types
Version:
Common mappings, aliases, and types used in Toreda TypeScript packages.
11 lines (10 loc) • 469 B
TypeScript
import type { RunnableOutcome } from './runnable/outcome';
import type { RunnableTask } from './runnable/task';
import type { RunnableTaskSync } from './runnable/task/sync';
export declare class Runnable<ArgDataT, ReturnT> {
readonly id: string;
private readonly task;
constructor(id: string, task: RunnableTask<ArgDataT, ReturnT> | RunnableTaskSync<ArgDataT, ReturnT>);
private assertInit;
run(data: ArgDataT): Promise<RunnableOutcome<ReturnT>>;
}