UNPKG

zigbee-herdsman-zigate

Version:

An open source ZigBee gateway solution with node.js.

20 lines 742 B
declare type Validator<TPayload, TMatcher> = (payload: TPayload, matcher: TMatcher) => boolean; declare type TimeoutFormatter<TMatcher> = (matcher: TMatcher, timeout: number) => string; declare class Waitress<TPayload, TMatcher> { private waiters; private validator; private timeoutFormatter; private currentID; constructor(validator: Validator<TPayload, TMatcher>, timeoutFormatter: TimeoutFormatter<TMatcher>); resolve(payload: TPayload): void; remove(ID: number): void; waitFor(matcher: TMatcher, timeout: number): { ID: number; start: () => { promise: Promise<TPayload>; ID: number; }; }; } export default Waitress; //# sourceMappingURL=waitress.d.ts.map