UNPKG

simonflex-framework

Version:

A library implements Meter Flex interface

18 lines (17 loc) 451 B
/** class to make promise interruptable */ export declare class PromInt { private rejectors; /** * interrupt all wrapped promises */ interrupt(): void; /** * wrap the promise * @param p the given promise * @returns the wrapped promise which will raise InterruptedError on interruption */ wrap<T>(p: Promise<T>): Promise<T>; } export declare class InterruptedError extends Error { constructor(); }