@xylabs/promise
Version:
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
8 lines • 327 B
TypeScript
import type { Promisable } from './types.ts';
/**
* Wraps a value in a Promise if it is not already one.
* @param value - A value that may or may not be a Promise.
* @returns A Promise resolving to the value.
*/
export declare function toPromise<T>(value: Promisable<T>): Promise<T>;
//# sourceMappingURL=toPromise.d.ts.map