import { Abortable } from '../index'; export declare const abortableContext: { /** * Runs the given callback in an abortable context. * All {@link Abortable}s registered during the callback using {@link registerAbortableInCurrentContext} are aborted when the provided {@link AbortController} is aborted. * If the code is already running in an abortable context, the given {@link AbortController} is registered as {@link Abortable} in the current context. * As a result, nested abortable contexts are aborted when the outer {@link AbortController} is aborted. */ runInContext(callback: () => T, abortController: AbortController): T; /** * Registers an {@link Abortable} in the current abortable context. The abortable is linked to the current {@link AbortController} (see {@link runInContext}) and is aborted when the controller is aborted. */ registerAbortableInCurrentContext(abortable: Abortable): void; }; /** * Marker class for aborted computations. */ export declare class AbortError { objectType: string; constructor(); } //# sourceMappingURL=abortableContext.d.ts.map