import type { ChildProcess, ChildProcessByStdio, ChildProcessWithoutNullStreams, ProcessEnvOptions, SpawnOptions, SpawnOptionsWithoutStdio, SpawnOptionsWithStdioTuple, StdioNull, StdioPipe } from "node:child_process"; import type { Readable, Writable } from "node:stream"; import type { Path } from "path-class"; import type { TrailingNewlineOptions } from "./trimTrailingNewlines"; export type NodeCwd = ProcessEnvOptions["cwd"] | Path; export type NodeWithCwd = Omit & { cwd?: NodeCwd; }; export interface WithExitPromises { success: Promise; exited: Promise; exitCodePromise: Promise; } export interface WithResponse { response: () => Response; text: (options?: TrailingNewlineOptions) => Promise; text0: () => AsyncGenerator; json: () => Promise; } export interface WithStdoutResponse { stdout: Readable & WithResponse; } export interface WithStderrResponse { stderr: Readable & WithResponse; } export declare function spawnType(options?: NodeWithCwd): ChildProcessWithoutNullStreams & WithExitPromises; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises & WithStdoutResponse & WithStderrResponse; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises & WithStdoutResponse; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises & WithStderrResponse; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises & WithStdoutResponse & WithStderrResponse; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises & WithStdoutResponse; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises & WithStderrResponse; export declare function spawnType(options: NodeWithCwd>): ChildProcessByStdio & WithExitPromises; export declare function spawnType(options: NodeWithCwd): ChildProcess & WithExitPromises;