UNPKG

@tmorin/ceb-messaging-simple

Version:

The package is part of the `<ceb/>` library. It provides an implementation of the messaging model leveraging on a vanilla TypeScript/JavaScript environment.

7 lines (6 loc) 327 B
/** * The method wraps a promise fulfillment in order to _cancel_ its resolution when a timeout is reached. * @param fn the provide of the promise * @param timeout the maximum time to wait for in millisecond */ export declare function waitForReturn<R>(fn: (...args: Array<any>) => Promise<R>, timeout: number): Promise<R>;