UNPKG

432 BTypeScriptView Raw
1import { ISignal } from '@lumino/signaling';
2/**
3 * Convert a signal into a promise for the first emitted value.
4 *
5 * @param signal - The signal we are listening to.
6 * @param timeout - Timeout to wait for signal in ms (not timeout if not defined or 0)
7 *
8 * @returns a Promise that resolves with a `(sender, args)` pair.
9 */
10export declare function signalToPromise<T, U>(signal: ISignal<T, U>, timeout?: number): Promise<[T, U]>;