/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ import { spawn } from "cross-spawn"; export interface InteractiveSpawnConfig { file: Parameters[0]; args: Parameters[1]; options: Parameters[2] & { cwd: string; }; } export interface InteractiveProcessActions { write: (response: string) => void; writeLine: (response: string) => void; stop: () => void; } export interface InteractiveProcess { exitCode: Promise; actions: InteractiveProcessActions; } /** * A wrapper around child_process.spawn that handles the platform specific differences * and provide an intuitive API for bidirectional communication with the * spawned process. */ export declare function spawnInteractive(config: InteractiveSpawnConfig, onData: (data: string) => void): InteractiveProcess; //# sourceMappingURL=interactive-process.d.ts.map