14 lines
379 B
TypeScript
14 lines
379 B
TypeScript
/// <reference types="node" />
|
|
import { Signal } from "./signals";
|
|
import { inspect } from "util";
|
|
export declare class Cancellable {
|
|
private impl;
|
|
cancelled: Signal<CancelledHandler>;
|
|
constructor();
|
|
get isCancelled(): boolean;
|
|
throwIfCancelled(): void;
|
|
cancel(): void;
|
|
[inspect.custom](): string;
|
|
}
|
|
export declare type CancelledHandler = () => void;
|