import { ICancellation, IDestroyable } from "./interfaces"; export declare class Cancellation implements ICancellation { private _reason; private _cbs; constructor(action: (cancel: (e?: any) => void) => void); isSupported(): boolean; throwIfRequested(): void; isRequested(): boolean; register(cb: (e: any) => void): IDestroyable; private _unregister; private _cancel; static readonly none: ICancellation; /** * Combines multiple cancellation tokens to the single aggregated token. * * Aggregated token will be considered as signalled when some tokens are * signalled. The cancellation callback can be registered with the `register` * method, it will be fired once with the first signalled token, all other * tokens will be ignored. * * The tokens which don't support cancellation are filtered out, if there are * no tokens left in the list the method returns `Cancellation.none`. * * @param args The list of cancellation tokens to combine * @returns Aggregated cancellation token */ static combine(...args: ICancellation[]): ICancellation; }