type AwaitedLike = T extends Promise ? R : T; type AnyFn = (...args: any[]) => any; type Chain = Promise> & (T extends AnyFn ? (...a: Parameters) => Chain>> : {}) & { [K in keyof T]: T[K] extends (...a: infer A) => infer R ? (...a: A) => Chain> : Chain>; }; export declare const WF_NODE: unique symbol; export declare function workflow(source: T | Promise): Chain; export {};