@effectful/cc
Version:
Multi-prompt delimited continuations runtime
20 lines (19 loc) • 602 B
TypeScript
/**
* Converts a possibly thenable value into a direct plain value.
*
* This is like `await` for a promise-like argument.
*
* @param value - The possibly thenable value to reify.
* @returns The reified value.
*/
export declare function reify<T>(value: PromiseLike<T>): T;
/**
* Converts direct style function into a promise.
*
* This is like marking a function `async` except it shouldn't be done for
* every function, only to a top level one.
*
* @param body - The function to reflect.
* @returns The reflected promise.
*/
export declare function reflect<T>(body: () => T): Promise<T>;