import { Disposable } from "@anz-bank/vscode-sysl-model"; import { SpawnOptions } from "child_process"; /** Executes child processes and records completion. */ export declare class Executor { private readonly processes; private onSettledListeners; /** * Executes an asynchronous function and records its existence until it completes. */ start(f: () => Promise): Promise; /** * Handles the completion of a process. If it was the final active process, invokes all onComplete * listeners. */ private end; /** * Subscribes a callback to be invoked when all active processes have finished. * * If there are no active processes, the callback is invoked immediately. */ onSettled(listener: () => any): Disposable; /** Returns a promise that resolves once all active processes have finished. */ allSettled(): Promise; /** Returns the number of active processes. */ get count(): number; /** Returns a unique ID for a new process. */ private id; } /** Spawns a child process and returns a promise that resolves to the buffer content of stdout. */ export declare function spawnBuffer(command: string, args?: ReadonlyArray, options?: SpawnOptions & { input?: any; }): Promise;