UNPKG

772 BTypeScriptView Raw
1import * as ts from 'typescript';
2export interface CancellationTokenData {
3 isCancelled: boolean;
4 cancellationFileName: string;
5}
6export declare class CancellationToken {
7 private typescript;
8 private isCancelled;
9 private cancellationFileName;
10 private lastCancellationCheckTime;
11 constructor(typescript: typeof ts, cancellationFileName?: string, isCancelled?: boolean);
12 static createFromJSON(typescript: typeof ts, json: CancellationTokenData): CancellationToken;
13 toJSON(): {
14 cancellationFileName: string;
15 isCancelled: boolean;
16 };
17 getCancellationFilePath(): string;
18 isCancellationRequested(): boolean;
19 throwIfCancellationRequested(): void;
20 requestCancellation(): void;
21 cleanupCancellation(): void;
22}