CancellationToken.d.ts 772 B

12345678910111213141516171819202122
  1. import * as ts from 'typescript';
  2. export interface CancellationTokenData {
  3. isCancelled: boolean;
  4. cancellationFileName: string;
  5. }
  6. export 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. }