diff --git a/types/subprocess/all.d.ts b/types/subprocess/all.d.ts index bbef016920..46af0dbe4c 100644 --- a/types/subprocess/all.d.ts +++ b/types/subprocess/all.d.ts @@ -3,22 +3,15 @@ import type {IgnoresSubprocessOutput} from '../return/ignore.js'; import type {Options} from '../arguments/options.js'; // `subprocess.all` -export type SubprocessAll = AllStream; +export type SubprocessAll = AllStream>; -type AllStream< +type AllStream = IsIgnored extends true ? undefined : Readable; + +type AllIgnored< AllOption extends Options['all'] = Options['all'], OptionsType extends Options = Options, > = AllOption extends true - ? AllIfStdout, OptionsType> - : undefined; - -type AllIfStdout< - StdoutResultIgnored extends boolean, - OptionsType extends Options = Options, -> = StdoutResultIgnored extends true - ? AllIfStderr> - : Readable; - -type AllIfStderr = StderrResultIgnored extends true - ? undefined - : Readable; + ? IgnoresSubprocessOutput<'1', OptionsType> extends true + ? IgnoresSubprocessOutput<'2', OptionsType> + : false + : true;