UNPKG

@ipp/cli

Version:

An image build orchestrator for the modern web

25 lines (24 loc) 822 B
/** * Image Processing Pipeline - Copyright (c) Marcus Cemes * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { Exception } from "@ipp/common"; export declare class InterruptException extends Exception { name: string; constructor(message: string); } export interface InterruptHandler { rejecter: Promise<never>; rejected: () => boolean; destroy: () => void; } /** * Attaches a SIGINT handler to the process, and returns a promise tha rejects * with an InterruptException when the handler is called. * * The handler may be unregistered using the returned destroy function, which resolves * the promise and removes the signal handler. */ export declare function createInterruptHandler(): InterruptHandler;