type OutputOf> = T extends Task ? Output : never; type OutputsOf[]> = { [K in keyof Tasks]: Tasks[K] extends Task ? OutputOf : never; }; /** * A context that is meant to be extensible. * It is passed from the runWorkflow function to each task * * Extend this interface to add your data to it */ export interface WorkflowContext { } export interface Task[], TOutput = any> { name: string; run: (input: OutputsOf, context?: WorkflowContext) => Promise; deps?: Deps; inputSchema?: unknown; outputSchema?: unknown; } export declare function defineTask[], Output = unknown>(options: Task): Task; export {};