Split type files (#978)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by ehmicky · committed by GitHub · parent 4b2e316 · Browse files · 132 files·+8057 added−6028 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
132 files+8057 added−6028 removed
- other:+8057 added−6028 removed
Provenance
- Commit
0bd0f0d- Tree
f611473- Author
ehmicky <ehmicky@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
4b2e316
132 files changed+8057 added−6028 removed
added:test-d/arguments/encoding-option.test-d.ts+45 added
123456789101112131415161718192021222324252627282930313233343536373839404142434445import {expectError} from 'tsd';import {execa, execaSync} from '../../index.js';
await execa('unicorns', {encoding: 'utf8'});execaSync('unicorns', {encoding: 'utf8'});/* eslint-disable unicorn/text-encoding-identifier-case */expectError(await execa('unicorns', {encoding: 'utf-8'}));expectError(execaSync('unicorns', {encoding: 'utf-8'}));expectError(await execa('unicorns', {encoding: 'UTF8'}));expectError(execaSync('unicorns', {encoding: 'UTF8'}));/* eslint-enable unicorn/text-encoding-identifier-case */
await execa('unicorns', {encoding: 'utf16le'});execaSync('unicorns', {encoding: 'utf16le'});expectError(await execa('unicorns', {encoding: 'utf-16le'}));expectError(execaSync('unicorns', {encoding: 'utf-16le'}));expectError(await execa('unicorns', {encoding: 'ucs2'}));expectError(execaSync('unicorns', {encoding: 'ucs2'}));expectError(await execa('unicorns', {encoding: 'ucs-2'}));expectError(execaSync('unicorns', {encoding: 'ucs-2'}));
await execa('unicorns', {encoding: 'buffer'});execaSync('unicorns', {encoding: 'buffer'});expectError(await execa('unicorns', {encoding: null}));expectError(execaSync('unicorns', {encoding: null}));
await execa('unicorns', {encoding: 'hex'});execaSync('unicorns', {encoding: 'hex'});
await execa('unicorns', {encoding: 'base64'});execaSync('unicorns', {encoding: 'base64'});
await execa('unicorns', {encoding: 'base64url'});execaSync('unicorns', {encoding: 'base64url'});
await execa('unicorns', {encoding: 'latin1'});execaSync('unicorns', {encoding: 'latin1'});expectError(await execa('unicorns', {encoding: 'binary'}));expectError(execaSync('unicorns', {encoding: 'binary'}));
await execa('unicorns', {encoding: 'ascii'});execaSync('unicorns', {encoding: 'ascii'});
expectError(await execa('unicorns', {encoding: 'unknownEncoding'}));expectError(execaSync('unicorns', {encoding: 'unknownEncoding'}));added:test-d/arguments/options.test-d.ts+192 added
1+import * as process from 'node:process';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {execa, execaSync, type Options, type SyncOptions} from '../../index.js';4+5+const fileUrl = new URL('file:///test');6+7+expectAssignable<Options>({cleanup: false});8+expectNotAssignable<SyncOptions>({cleanup: false});9+expectAssignable<SyncOptions>({preferLocal: false});10+11+await execa('unicorns', {preferLocal: false});12+execaSync('unicorns', {preferLocal: false});13+expectError(await execa('unicorns', {preferLocal: 'false'}));14+expectError(execaSync('unicorns', {preferLocal: 'false'}));15+16+await execa('unicorns', {localDir: '.'});17+execaSync('unicorns', {localDir: '.'});18+await execa('unicorns', {localDir: fileUrl});19+execaSync('unicorns', {localDir: fileUrl});20+expectError(await execa('unicorns', {localDir: false}));21+expectError(execaSync('unicorns', {localDir: false}));22+23+await execa('unicorns', {node: true});24+execaSync('unicorns', {node: true});25+expectError(await execa('unicorns', {node: 'true'}));26+expectError(execaSync('unicorns', {node: 'true'}));27+28+await execa('unicorns', {nodePath: './node'});29+execaSync('unicorns', {nodePath: './node'});30+await execa('unicorns', {nodePath: fileUrl});31+execaSync('unicorns', {nodePath: fileUrl});32+expectError(await execa('unicorns', {nodePath: false}));33+expectError(execaSync('unicorns', {nodePath: false}));34+35+await execa('unicorns', {nodeOptions: ['--async-stack-traces'] as const});36+execaSync('unicorns', {nodeOptions: ['--async-stack-traces'] as const});37+expectError(await execa('unicorns', {nodeOptions: [false] as const}));38+expectError(execaSync('unicorns', {nodeOptions: [false] as const}));39+40+await execa('unicorns', {input: ''});41+execaSync('unicorns', {input: ''});42+await execa('unicorns', {input: new Uint8Array()});43+execaSync('unicorns', {input: new Uint8Array()});44+await execa('unicorns', {input: process.stdin});45+execaSync('unicorns', {input: process.stdin});46+expectError(await execa('unicorns', {input: false}));47+expectError(execaSync('unicorns', {input: false}));48+49+await execa('unicorns', {inputFile: ''});50+execaSync('unicorns', {inputFile: ''});51+await execa('unicorns', {inputFile: fileUrl});52+execaSync('unicorns', {inputFile: fileUrl});53+expectError(await execa('unicorns', {inputFile: false}));54+expectError(execaSync('unicorns', {inputFile: false}));55+56+await execa('unicorns', {lines: false});57+execaSync('unicorns', {lines: false});58+expectError(await execa('unicorns', {lines: 'false'}));59+expectError(execaSync('unicorns', {lines: 'false'}));60+61+await execa('unicorns', {reject: false});62+execaSync('unicorns', {reject: false});63+expectError(await execa('unicorns', {reject: 'false'}));64+expectError(execaSync('unicorns', {reject: 'false'}));65+66+await execa('unicorns', {stripFinalNewline: false});67+execaSync('unicorns', {stripFinalNewline: false});68+expectError(await execa('unicorns', {stripFinalNewline: 'false'}));69+expectError(execaSync('unicorns', {stripFinalNewline: 'false'}));70+71+await execa('unicorns', {extendEnv: false});72+execaSync('unicorns', {extendEnv: false});73+expectError(await execa('unicorns', {extendEnv: 'false'}));74+expectError(execaSync('unicorns', {extendEnv: 'false'}));75+76+await execa('unicorns', {cwd: '.'});77+execaSync('unicorns', {cwd: '.'});78+await execa('unicorns', {cwd: fileUrl});79+execaSync('unicorns', {cwd: fileUrl});80+expectError(await execa('unicorns', {cwd: false}));81+expectError(execaSync('unicorns', {cwd: false}));82+83+/* eslint-disable @typescript-eslint/naming-convention */84+await execa('unicorns', {env: {PATH: ''}});85+execaSync('unicorns', {env: {PATH: ''}});86+/* eslint-enable @typescript-eslint/naming-convention */87+expectError(await execa('unicorns', {env: false}));88+expectError(execaSync('unicorns', {env: false}));89+90+await execa('unicorns', {argv0: ''});91+execaSync('unicorns', {argv0: ''});92+expectError(await execa('unicorns', {argv0: false}));93+expectError(execaSync('unicorns', {argv0: false}));94+95+await execa('unicorns', {uid: 0});96+execaSync('unicorns', {uid: 0});97+expectError(await execa('unicorns', {uid: '0'}));98+expectError(execaSync('unicorns', {uid: '0'}));99+100+await execa('unicorns', {gid: 0});101+execaSync('unicorns', {gid: 0});102+expectError(await execa('unicorns', {gid: '0'}));103+expectError(execaSync('unicorns', {gid: '0'}));104+105+await execa('unicorns', {shell: true});106+execaSync('unicorns', {shell: true});107+await execa('unicorns', {shell: '/bin/sh'});108+execaSync('unicorns', {shell: '/bin/sh'});109+await execa('unicorns', {shell: fileUrl});110+execaSync('unicorns', {shell: fileUrl});111+expectError(await execa('unicorns', {shell: {}}));112+expectError(execaSync('unicorns', {shell: {}}));113+114+await execa('unicorns', {timeout: 1000});115+execaSync('unicorns', {timeout: 1000});116+expectError(await execa('unicorns', {timeout: '1000'}));117+expectError(execaSync('unicorns', {timeout: '1000'}));118+119+await execa('unicorns', {maxBuffer: 1000});120+execaSync('unicorns', {maxBuffer: 1000});121+expectError(await execa('unicorns', {maxBuffer: '1000'}));122+expectError(execaSync('unicorns', {maxBuffer: '1000'}));123+124+await execa('unicorns', {killSignal: 'SIGTERM'});125+execaSync('unicorns', {killSignal: 'SIGTERM'});126+await execa('unicorns', {killSignal: 9});127+execaSync('unicorns', {killSignal: 9});128+expectError(await execa('unicorns', {killSignal: false}));129+expectError(execaSync('unicorns', {killSignal: false}));130+131+await execa('unicorns', {forceKillAfterDelay: false});132+expectError(execaSync('unicorns', {forceKillAfterDelay: false}));133+await execa('unicorns', {forceKillAfterDelay: 42});134+expectError(execaSync('unicorns', {forceKillAfterDelay: 42}));135+expectError(await execa('unicorns', {forceKillAfterDelay: 'true'}));136+expectError(execaSync('unicorns', {forceKillAfterDelay: 'true'}));137+138+await execa('unicorns', {windowsVerbatimArguments: true});139+execaSync('unicorns', {windowsVerbatimArguments: true});140+expectError(await execa('unicorns', {windowsVerbatimArguments: 'true'}));141+expectError(execaSync('unicorns', {windowsVerbatimArguments: 'true'}));142+143+await execa('unicorns', {windowsHide: false});144+execaSync('unicorns', {windowsHide: false});145+expectError(await execa('unicorns', {windowsHide: 'false'}));146+expectError(execaSync('unicorns', {windowsHide: 'false'}));147+148+await execa('unicorns', {verbose: 'none'});149+execaSync('unicorns', {verbose: 'none'});150+await execa('unicorns', {verbose: 'short'});151+execaSync('unicorns', {verbose: 'short'});152+await execa('unicorns', {verbose: 'full'});153+execaSync('unicorns', {verbose: 'full'});154+expectError(await execa('unicorns', {verbose: 'other'}));155+expectError(execaSync('unicorns', {verbose: 'other'}));156+157+await execa('unicorns', {cleanup: false});158+expectError(execaSync('unicorns', {cleanup: false}));159+expectError(await execa('unicorns', {cleanup: 'false'}));160+expectError(execaSync('unicorns', {cleanup: 'false'}));161+162+await execa('unicorns', {buffer: false});163+execaSync('unicorns', {buffer: false});164+expectError(await execa('unicorns', {buffer: 'false'}));165+expectError(execaSync('unicorns', {buffer: 'false'}));166+167+await execa('unicorns', {all: true});168+execaSync('unicorns', {all: true});169+expectError(await execa('unicorns', {all: 'true'}));170+expectError(execaSync('unicorns', {all: 'true'}));171+172+await execa('unicorns', {ipc: true});173+expectError(execaSync('unicorns', {ipc: true}));174+expectError(await execa('unicorns', {ipc: 'true'}));175+expectError(execaSync('unicorns', {ipc: 'true'}));176+177+await execa('unicorns', {serialization: 'json'});178+expectError(execaSync('unicorns', {serialization: 'json'}));179+await execa('unicorns', {serialization: 'advanced'});180+expectError(execaSync('unicorns', {serialization: 'advanced'}));181+expectError(await execa('unicorns', {serialization: 'other'}));182+expectError(execaSync('unicorns', {serialization: 'other'}));183+184+await execa('unicorns', {detached: true});185+expectError(execaSync('unicorns', {detached: true}));186+expectError(await execa('unicorns', {detached: 'true'}));187+expectError(execaSync('unicorns', {detached: 'true'}));188+189+await execa('unicorns', {cancelSignal: new AbortController().signal});190+expectError(execaSync('unicorns', {cancelSignal: new AbortController().signal}));191+expectError(await execa('unicorns', {cancelSignal: false}));192+expectError(execaSync('unicorns', {cancelSignal: false}));added:test-d/arguments/specific.test-d.ts+147 added
1+import {expectType, expectError} from 'tsd';2+import {execa, execaSync} from '../../index.js';3+4+await execa('unicorns', {maxBuffer: {}});5+expectError(await execa('unicorns', {maxBuffer: []}));6+await execa('unicorns', {maxBuffer: {stdout: 0}});7+await execa('unicorns', {maxBuffer: {stderr: 0}});8+await execa('unicorns', {maxBuffer: {stdout: 0, stderr: 0} as const});9+await execa('unicorns', {maxBuffer: {all: 0}});10+await execa('unicorns', {maxBuffer: {fd1: 0}});11+await execa('unicorns', {maxBuffer: {fd2: 0}});12+await execa('unicorns', {maxBuffer: {fd3: 0}});13+expectError(await execa('unicorns', {maxBuffer: {stdout: '0'}}));14+15+execaSync('unicorns', {maxBuffer: {}});16+expectError(execaSync('unicorns', {maxBuffer: []}));17+execaSync('unicorns', {maxBuffer: {stdout: 0}});18+execaSync('unicorns', {maxBuffer: {stderr: 0}});19+execaSync('unicorns', {maxBuffer: {stdout: 0, stderr: 0} as const});20+execaSync('unicorns', {maxBuffer: {all: 0}});21+execaSync('unicorns', {maxBuffer: {fd1: 0}});22+execaSync('unicorns', {maxBuffer: {fd2: 0}});23+execaSync('unicorns', {maxBuffer: {fd3: 0}});24+expectError(execaSync('unicorns', {maxBuffer: {stdout: '0'}}));25+26+await execa('unicorns', {verbose: {}});27+expectError(await execa('unicorns', {verbose: []}));28+await execa('unicorns', {verbose: {stdout: 'none'}});29+await execa('unicorns', {verbose: {stderr: 'none'}});30+await execa('unicorns', {verbose: {stdout: 'none', stderr: 'none'} as const});31+await execa('unicorns', {verbose: {all: 'none'}});32+await execa('unicorns', {verbose: {fd1: 'none'}});33+await execa('unicorns', {verbose: {fd2: 'none'}});34+await execa('unicorns', {verbose: {fd3: 'none'}});35+expectError(await execa('unicorns', {verbose: {stdout: 'other'}}));36+37+execaSync('unicorns', {verbose: {}});38+expectError(execaSync('unicorns', {verbose: []}));39+execaSync('unicorns', {verbose: {stdout: 'none'}});40+execaSync('unicorns', {verbose: {stderr: 'none'}});41+execaSync('unicorns', {verbose: {stdout: 'none', stderr: 'none'} as const});42+execaSync('unicorns', {verbose: {all: 'none'}});43+execaSync('unicorns', {verbose: {fd1: 'none'}});44+execaSync('unicorns', {verbose: {fd2: 'none'}});45+execaSync('unicorns', {verbose: {fd3: 'none'}});46+expectError(execaSync('unicorns', {verbose: {stdout: 'other'}}));47+48+await execa('unicorns', {stripFinalNewline: {}});49+expectError(await execa('unicorns', {stripFinalNewline: []}));50+await execa('unicorns', {stripFinalNewline: {stdout: true}});51+await execa('unicorns', {stripFinalNewline: {stderr: true}});52+await execa('unicorns', {stripFinalNewline: {stdout: true, stderr: true} as const});53+await execa('unicorns', {stripFinalNewline: {all: true}});54+await execa('unicorns', {stripFinalNewline: {fd1: true}});55+await execa('unicorns', {stripFinalNewline: {fd2: true}});56+await execa('unicorns', {stripFinalNewline: {fd3: true}});57+expectError(await execa('unicorns', {stripFinalNewline: {stdout: 'true'}}));58+59+execaSync('unicorns', {stripFinalNewline: {}});60+expectError(execaSync('unicorns', {stripFinalNewline: []}));61+execaSync('unicorns', {stripFinalNewline: {stdout: true}});62+execaSync('unicorns', {stripFinalNewline: {stderr: true}});63+execaSync('unicorns', {stripFinalNewline: {stdout: true, stderr: true} as const});64+execaSync('unicorns', {stripFinalNewline: {all: true}});65+execaSync('unicorns', {stripFinalNewline: {fd1: true}});66+execaSync('unicorns', {stripFinalNewline: {fd2: true}});67+execaSync('unicorns', {stripFinalNewline: {fd3: true}});68+expectError(execaSync('unicorns', {stripFinalNewline: {stdout: 'true'}}));69+70+await execa('unicorns', {lines: {}});71+expectError(await execa('unicorns', {lines: []}));72+await execa('unicorns', {lines: {stdout: true}});73+await execa('unicorns', {lines: {stderr: true}});74+await execa('unicorns', {lines: {stdout: true, stderr: true} as const});75+await execa('unicorns', {lines: {all: true}});76+await execa('unicorns', {lines: {fd1: true}});77+await execa('unicorns', {lines: {fd2: true}});78+await execa('unicorns', {lines: {fd3: true}});79+expectError(await execa('unicorns', {lines: {stdout: 'true'}}));80+81+execaSync('unicorns', {lines: {}});82+expectError(execaSync('unicorns', {lines: []}));83+execaSync('unicorns', {lines: {stdout: true}});84+execaSync('unicorns', {lines: {stderr: true}});85+execaSync('unicorns', {lines: {stdout: true, stderr: true} as const});86+execaSync('unicorns', {lines: {all: true}});87+execaSync('unicorns', {lines: {fd1: true}});88+execaSync('unicorns', {lines: {fd2: true}});89+execaSync('unicorns', {lines: {fd3: true}});90+expectError(execaSync('unicorns', {lines: {stdout: 'true'}}));91+92+await execa('unicorns', {buffer: {}});93+expectError(await execa('unicorns', {buffer: []}));94+await execa('unicorns', {buffer: {stdout: true}});95+await execa('unicorns', {buffer: {stderr: true}});96+await execa('unicorns', {buffer: {stdout: true, stderr: true} as const});97+await execa('unicorns', {buffer: {all: true}});98+await execa('unicorns', {buffer: {fd1: true}});99+await execa('unicorns', {buffer: {fd2: true}});100+await execa('unicorns', {buffer: {fd3: true}});101+expectError(await execa('unicorns', {buffer: {stdout: 'true'}}));102+103+execaSync('unicorns', {buffer: {}});104+expectError(execaSync('unicorns', {buffer: []}));105+execaSync('unicorns', {buffer: {stdout: true}});106+execaSync('unicorns', {buffer: {stderr: true}});107+execaSync('unicorns', {buffer: {stdout: true, stderr: true} as const});108+execaSync('unicorns', {buffer: {all: true}});109+execaSync('unicorns', {buffer: {fd1: true}});110+execaSync('unicorns', {buffer: {fd2: true}});111+execaSync('unicorns', {buffer: {fd3: true}});112+expectError(execaSync('unicorns', {buffer: {stdout: 'true'}}));113+114+expectError(await execa('unicorns', {preferLocal: {}}));115+expectError(await execa('unicorns', {preferLocal: []}));116+expectError(await execa('unicorns', {preferLocal: {stdout: 0}}));117+expectError(await execa('unicorns', {preferLocal: {stderr: 0}}));118+expectError(await execa('unicorns', {preferLocal: {stdout: 0, stderr: 0} as const}));119+expectError(await execa('unicorns', {preferLocal: {all: 0}}));120+expectError(await execa('unicorns', {preferLocal: {fd1: 0}}));121+expectError(await execa('unicorns', {preferLocal: {fd2: 0}}));122+expectError(await execa('unicorns', {preferLocal: {fd3: 0}}));123+expectError(await execa('unicorns', {preferLocal: {stdout: '0'}}));124+125+expectError(execaSync('unicorns', {preferLocal: {}}));126+expectError(execaSync('unicorns', {preferLocal: []}));127+expectError(execaSync('unicorns', {preferLocal: {stdout: 0}}));128+expectError(execaSync('unicorns', {preferLocal: {stderr: 0}}));129+expectError(execaSync('unicorns', {preferLocal: {stdout: 0, stderr: 0} as const}));130+expectError(execaSync('unicorns', {preferLocal: {all: 0}}));131+expectError(execaSync('unicorns', {preferLocal: {fd1: 0}}));132+expectError(execaSync('unicorns', {preferLocal: {fd2: 0}}));133+expectError(execaSync('unicorns', {preferLocal: {fd3: 0}}));134+expectError(execaSync('unicorns', {preferLocal: {stdout: '0'}}));135+136+expectType<string[]>(execaSync('unicorns', {lines: {stdout: true, fd1: false}}).stdout);137+expectType<string[]>(execaSync('unicorns', {lines: {stdout: true, all: false}}).stdout);138+expectType<string[]>(execaSync('unicorns', {lines: {fd1: true, all: false}}).stdout);139+expectType<string[]>(execaSync('unicorns', {lines: {stderr: true, fd2: false}}).stderr);140+expectType<string[]>(execaSync('unicorns', {lines: {stderr: true, all: false}}).stderr);141+expectType<string[]>(execaSync('unicorns', {lines: {fd2: true, all: false}}).stderr);142+expectType<string[]>(execaSync('unicorns', {lines: {fd1: false, stdout: true}}).stdout);143+expectType<string[]>(execaSync('unicorns', {lines: {all: false, stdout: true}}).stdout);144+expectType<string[]>(execaSync('unicorns', {lines: {all: false, fd1: true}}).stdout);145+expectType<string[]>(execaSync('unicorns', {lines: {fd2: false, stderr: true}}).stderr);146+expectType<string[]>(execaSync('unicorns', {lines: {all: false, stderr: true}}).stderr);147+expectType<string[]>(execaSync('unicorns', {lines: {all: false, fd2: true}}).stderr);added:test-d/convert/duplex.test-d.ts+29 added
1234567891011121314151617181920212223242526272829import type {Duplex} from 'node:stream';import {expectType, expectError} from 'tsd';import {execa} from '../../index.js';
const execaPromise = execa('unicorns');
expectType<Duplex>(execaPromise.duplex());
execaPromise.duplex({from: 'stdout'});execaPromise.duplex({from: 'stderr'});execaPromise.duplex({from: 'all'});execaPromise.duplex({from: 'fd3'});execaPromise.duplex({from: 'stdout', to: 'stdin'});execaPromise.duplex({from: 'stdout', to: 'fd3'});expectError(execaPromise.duplex({from: 'stdin'}));expectError(execaPromise.duplex({from: 'stderr', to: 'stdout'}));expectError(execaPromise.duplex({from: 'fd'}));expectError(execaPromise.duplex({from: 'fdNotANumber'}));expectError(execaPromise.duplex({to: 'fd'}));expectError(execaPromise.duplex({to: 'fdNotANumber'}));
execaPromise.duplex({binary: false});expectError(execaPromise.duplex({binary: 'false'}));
execaPromise.duplex({preserveNewlines: false});expectError(execaPromise.duplex({preserveNewlines: 'false'}));
expectError(execaPromise.duplex('stdout'));expectError(execaPromise.duplex({other: 'stdout'}));added:test-d/convert/iterable.test-d.ts+84 added
1+import {expectType, expectError} from 'tsd';2+import {execa} from '../../index.js';3+4+const execaPromise = execa('unicorns');5+const execaBufferPromise = execa('unicorns', {encoding: 'buffer', all: true});6+const execaHexPromise = execa('unicorns', {encoding: 'hex', all: true});7+8+const asyncIteration = async () => {9+ for await (const line of execaPromise) {10+ expectType<string>(line);11+ }12+13+ for await (const line of execaPromise.iterable()) {14+ expectType<string>(line);15+ }16+17+ for await (const line of execaPromise.iterable({binary: false})) {18+ expectType<string>(line);19+ }20+21+ for await (const line of execaPromise.iterable({binary: true})) {22+ expectType<Uint8Array>(line);23+ }24+25+ for await (const line of execaPromise.iterable({} as {binary: boolean})) {26+ expectType<string | Uint8Array>(line);27+ }28+29+ for await (const line of execaBufferPromise) {30+ expectType<Uint8Array>(line);31+ }32+33+ for await (const line of execaBufferPromise.iterable()) {34+ expectType<Uint8Array>(line);35+ }36+37+ for await (const line of execaBufferPromise.iterable({binary: false})) {38+ expectType<Uint8Array>(line);39+ }40+41+ for await (const line of execaBufferPromise.iterable({binary: true})) {42+ expectType<Uint8Array>(line);43+ }44+45+ for await (const line of execaBufferPromise.iterable({} as {binary: boolean})) {46+ expectType<Uint8Array>(line);47+ }48+};49+50+await asyncIteration();51+52+expectType<AsyncIterableIterator<string>>(execaPromise.iterable());53+expectType<AsyncIterableIterator<string>>(execaPromise.iterable({binary: false}));54+expectType<AsyncIterableIterator<Uint8Array>>(execaPromise.iterable({binary: true}));55+expectType<AsyncIterableIterator<string | Uint8Array>>(execaPromise.iterable({} as {binary: boolean}));56+57+expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable());58+expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable({binary: false}));59+expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable({binary: true}));60+expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable({} as {binary: boolean}));61+62+expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable());63+expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable({binary: false}));64+expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable({binary: true}));65+expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable({} as {binary: boolean}));66+67+execaPromise.iterable({});68+execaPromise.iterable({from: 'stdout'});69+execaPromise.iterable({from: 'stderr'});70+execaPromise.iterable({from: 'all'});71+execaPromise.iterable({from: 'fd3'});72+expectError(execaPromise.iterable({from: 'stdin'}));73+expectError(execaPromise.iterable({from: 'fd'}));74+expectError(execaPromise.iterable({from: 'fdNotANumber'}));75+expectError(execaPromise.iterable({to: 'stdin'}));76+77+execaPromise.iterable({binary: false});78+expectError(execaPromise.iterable({binary: 'false'}));79+80+execaPromise.iterable({preserveNewlines: false});81+expectError(execaPromise.iterable({preserveNewlines: 'false'}));82+83+expectError(execaPromise.iterable('stdout'));84+expectError(execaPromise.iterable({other: 'stdout'}));added:test-d/convert/readable.test-d.ts+25 added
12345678910111213141516171819202122232425import type {Readable} from 'node:stream';import {expectType, expectError} from 'tsd';import {execa} from '../../index.js';
const execaPromise = execa('unicorns');
expectType<Readable>(execaPromise.readable());
execaPromise.readable({from: 'stdout'});execaPromise.readable({from: 'stderr'});execaPromise.readable({from: 'all'});execaPromise.readable({from: 'fd3'});expectError(execaPromise.readable({from: 'stdin'}));expectError(execaPromise.readable({from: 'fd'}));expectError(execaPromise.readable({from: 'fdNotANumber'}));expectError(execaPromise.readable({to: 'stdin'}));
execaPromise.readable({binary: false});expectError(execaPromise.readable({binary: 'false'}));
execaPromise.readable({preserveNewlines: false});expectError(execaPromise.readable({preserveNewlines: 'false'}));
expectError(execaPromise.readable('stdout'));expectError(execaPromise.readable({other: 'stdout'}));added:test-d/convert/writable.test-d.ts+21 added
123456789101112131415161718192021import type {Writable} from 'node:stream';import {expectType, expectError} from 'tsd';import {execa} from '../../index.js';
const execaPromise = execa('unicorns');
expectType<Writable>(execaPromise.writable());
execaPromise.writable({to: 'stdin'});execaPromise.writable({to: 'fd3'});expectError(execaPromise.writable({to: 'stdout'}));expectError(execaPromise.writable({to: 'fd'}));expectError(execaPromise.writable({to: 'fdNotANumber'}));expectError(execaPromise.writable({from: 'stdout'}));
expectError(execaPromise.writable({binary: false}));
expectError(execaPromise.writable({preserveNewlines: false}));
expectError(execaPromise.writable('stdin'));expectError(execaPromise.writable({other: 'stdin'}));added:test-d/methods/command.test-d.ts+94 added
1+import {expectType, expectError, expectAssignable} from 'tsd';2+import {execaCommand, execaCommandSync, type ExecaResult, type ExecaSubprocess, type ExecaSyncResult} from '../../index.js';3+4+const fileUrl = new URL('file:///test');5+const stringArray = ['foo', 'bar'] as const;6+7+expectError(execaCommand());8+expectError(execaCommand(true));9+expectError(execaCommand(['unicorns', 'arg']));10+expectAssignable<ExecaSubprocess>(execaCommand('unicorns'));11+expectError(execaCommand(fileUrl));12+13+expectError(execaCommand('unicorns', []));14+expectError(execaCommand('unicorns', ['foo']));15+expectError(execaCommand('unicorns', 'foo'));16+expectError(execaCommand('unicorns', [true]));17+18+expectAssignable<ExecaSubprocess>(execaCommand('unicorns', {}));19+expectError(execaCommand('unicorns', [], {}));20+expectError(execaCommand('unicorns', [], []));21+expectError(execaCommand('unicorns', {other: true}));22+23+expectAssignable<ExecaSubprocess>(execaCommand`unicorns`);24+expectType<ExecaResult<{}>>(await execaCommand('unicorns'));25+expectType<ExecaResult<{}>>(await execaCommand`unicorns`);26+27+expectAssignable<typeof execaCommand>(execaCommand({}));28+expectAssignable<ExecaSubprocess>(execaCommand({})('unicorns'));29+expectAssignable<ExecaSubprocess>(execaCommand({})`unicorns`);30+31+expectAssignable<{stdout: string}>(await execaCommand('unicorns'));32+expectAssignable<{stdout: Uint8Array}>(await execaCommand('unicorns', {encoding: 'buffer'}));33+expectAssignable<{stdout: string}>(await execaCommand({})('unicorns'));34+expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})('unicorns'));35+expectAssignable<{stdout: Uint8Array}>(await execaCommand({})({encoding: 'buffer'})('unicorns'));36+expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})({})('unicorns'));37+expectAssignable<{stdout: string}>(await execaCommand({})`unicorns`);38+expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})`unicorns`);39+expectAssignable<{stdout: Uint8Array}>(await execaCommand({})({encoding: 'buffer'})`unicorns`);40+expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})({})`unicorns`);41+42+expectType<ExecaResult<{}>>(await execaCommand`${'unicorns'}`);43+expectType<ExecaResult<{}>>(await execaCommand`unicorns ${'foo'}`);44+expectError(await execaCommand`unicorns ${'foo'} ${'bar'}`);45+expectError(await execaCommand`unicorns ${1}`);46+expectError(await execaCommand`unicorns ${stringArray}`);47+expectError(await execaCommand`unicorns ${[1, 2]}`);48+expectType<ExecaResult<{}>>(await execaCommand`unicorns ${false.toString()}`);49+expectError(await execaCommand`unicorns ${false}`);50+51+expectError(await execaCommand`unicorns ${await execaCommand`echo foo`}`);52+expectError(await execaCommand`unicorns ${execaCommand`echo foo`}`);53+expectError(await execaCommand`unicorns ${[await execaCommand`echo foo`, 'bar']}`);54+expectError(await execaCommand`unicorns ${[execaCommand`echo foo`, 'bar']}`);55+56+expectError(execaCommandSync());57+expectError(execaCommandSync(true));58+expectError(execaCommandSync(['unicorns', 'arg']));59+expectType<ExecaSyncResult<{}>>(execaCommandSync('unicorns'));60+expectError(execaCommandSync(fileUrl));61+expectError(execaCommandSync('unicorns', []));62+expectError(execaCommandSync('unicorns', ['foo']));63+expectType<ExecaSyncResult<{}>>(execaCommandSync('unicorns', {}));64+expectError(execaCommandSync('unicorns', [], {}));65+expectError(execaCommandSync('unicorns', 'foo'));66+expectError(execaCommandSync('unicorns', [true]));67+expectError(execaCommandSync('unicorns', [], []));68+expectError(execaCommandSync('unicorns', {other: true}));69+expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns`);70+expectAssignable<typeof execaCommandSync>(execaCommandSync({}));71+expectType<ExecaSyncResult<{}>>(execaCommandSync({})('unicorns'));72+expectType<ExecaSyncResult<{}>>(execaCommandSync({})`unicorns`);73+expectType<ExecaSyncResult<{}>>(execaCommandSync('unicorns'));74+expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns`);75+expectAssignable<{stdout: string}>(execaCommandSync('unicorns'));76+expectAssignable<{stdout: Uint8Array}>(execaCommandSync('unicorns', {encoding: 'buffer'}));77+expectAssignable<{stdout: string}>(execaCommandSync({})('unicorns'));78+expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})('unicorns'));79+expectAssignable<{stdout: Uint8Array}>(execaCommandSync({})({encoding: 'buffer'})('unicorns'));80+expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})({})('unicorns'));81+expectAssignable<{stdout: string}>(execaCommandSync({})`unicorns`);82+expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})`unicorns`);83+expectAssignable<{stdout: Uint8Array}>(execaCommandSync({})({encoding: 'buffer'})`unicorns`);84+expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})({})`unicorns`);85+expectType<ExecaSyncResult<{}>>(execaCommandSync`${'unicorns'}`);86+expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns ${'foo'}`);87+expectError(execaCommandSync`unicorns ${'foo'} ${'bar'}`);88+expectError(execaCommandSync`unicorns ${1}`);89+expectError(execaCommandSync`unicorns ${stringArray}`);90+expectError(execaCommandSync`unicorns ${[1, 2]}`);91+expectError(execaCommandSync`unicorns ${execaCommandSync`echo foo`}`);92+expectError(execaCommandSync`unicorns ${[execaCommandSync`echo foo`, 'bar']}`);93+expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns ${false.toString()}`);94+expectError(execaCommandSync`unicorns ${false}`);added:test-d/methods/main-async.test-d.ts+56 added
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556import {expectType, expectError, expectAssignable} from 'tsd';import {execa, type ExecaResult, type ExecaSubprocess} from '../../index.js';
const fileUrl = new URL('file:///test');const stringArray = ['foo', 'bar'] as const;
expectError(execa());expectError(execa(true));expectError(execa(['unicorns', 'arg']));expectAssignable<ExecaSubprocess>(execa('unicorns'));expectAssignable<ExecaSubprocess>(execa(fileUrl));
expectAssignable<ExecaSubprocess>(execa('unicorns', []));expectAssignable<ExecaSubprocess>(execa('unicorns', ['foo']));expectError(execa('unicorns', 'foo'));expectError(execa('unicorns', [true]));
expectAssignable<ExecaSubprocess>(execa('unicorns', {}));expectAssignable<ExecaSubprocess>(execa('unicorns', [], {}));expectError(execa('unicorns', [], []));expectError(execa('unicorns', {other: true}));
expectAssignable<ExecaSubprocess>(execa`unicorns`);expectType<ExecaResult<{}>>(await execa('unicorns'));expectType<ExecaResult<{}>>(await execa`unicorns`);
expectAssignable<typeof execa>(execa({}));expectAssignable<ExecaSubprocess>(execa({})('unicorns'));expectAssignable<ExecaSubprocess>(execa({})`unicorns`);
expectAssignable<{stdout: string}>(await execa('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execa('unicorns', {encoding: 'buffer'}));expectAssignable<{stdout: string}>(await execa('unicorns', ['foo']));expectAssignable<{stdout: Uint8Array}>(await execa('unicorns', ['foo'], {encoding: 'buffer'}));expectAssignable<{stdout: string}>(await execa({})('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execa({})({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})({})('unicorns'));expectAssignable<{stdout: string}>(await execa({})`unicorns`);expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>(await execa({})({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})({})`unicorns`);
expectType<ExecaResult<{}>>(await execa`${'unicorns'}`);expectType<ExecaResult<{}>>(await execa`unicorns ${'foo'}`);expectType<ExecaResult<{}>>(await execa`unicorns ${'foo'} ${'bar'}`);expectType<ExecaResult<{}>>(await execa`unicorns ${1}`);expectType<ExecaResult<{}>>(await execa`unicorns ${stringArray}`);expectType<ExecaResult<{}>>(await execa`unicorns ${[1, 2]}`);expectType<ExecaResult<{}>>(await execa`unicorns ${false.toString()}`);expectError(await execa`unicorns ${false}`);
expectType<ExecaResult<{}>>(await execa`unicorns ${await execa`echo foo`}`);expectError(await execa`unicorns ${execa`echo foo`}`);expectType<ExecaResult<{}>>(await execa`unicorns ${[await execa`echo foo`, 'bar']}`);expectError(await execa`unicorns ${[execa`echo foo`, 'bar']}`);added:test-d/methods/main-sync.test-d.ts+54 added
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354import {expectType, expectError, expectAssignable} from 'tsd';import {execaSync, type ExecaSyncResult} from '../../index.js';
const fileUrl = new URL('file:///test');const stringArray = ['foo', 'bar'] as const;
expectError(execaSync());expectError(execaSync(true));expectError(execaSync(['unicorns', 'arg']));expectType<ExecaSyncResult<{}>>(execaSync('unicorns'));expectType<ExecaSyncResult<{}>>(execaSync(fileUrl));
expectType<ExecaSyncResult<{}>>(execaSync('unicorns', []));expectType<ExecaSyncResult<{}>>(execaSync('unicorns', ['foo']));expectError(execaSync('unicorns', 'foo'));expectError(execaSync('unicorns', [true]));
expectType<ExecaSyncResult<{}>>(execaSync('unicorns', {}));expectType<ExecaSyncResult<{}>>(execaSync('unicorns', [], {}));expectError(execaSync('unicorns', [], []));expectError(execaSync('unicorns', {other: true}));
expectType<ExecaSyncResult<{}>>(execaSync`unicorns`);expectType<ExecaSyncResult<{}>>(execaSync('unicorns'));expectType<ExecaSyncResult<{}>>(execaSync`unicorns`);
expectAssignable<typeof execaSync>(execaSync({}));expectType<ExecaSyncResult<{}>>(execaSync({})('unicorns'));expectType<ExecaSyncResult<{}>>(execaSync({})`unicorns`);
expectAssignable<{stdout: string}>(execaSync('unicorns'));expectAssignable<{stdout: Uint8Array}>(execaSync('unicorns', {encoding: 'buffer'}));expectAssignable<{stdout: string}>(execaSync('unicorns', ['foo']));expectAssignable<{stdout: Uint8Array}>(execaSync('unicorns', ['foo'], {encoding: 'buffer'}));expectAssignable<{stdout: string}>(execaSync({})('unicorns'));expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>(execaSync({})({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})({})('unicorns'));expectAssignable<{stdout: string}>(execaSync({})`unicorns`);expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>(execaSync({})({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})({})`unicorns`);
expectType<ExecaSyncResult<{}>>(execaSync`${'unicorns'}`);expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${'foo'}`);expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${'foo'} ${'bar'}`);expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${1}`);expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${stringArray}`);expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${[1, 2]}`);expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${false.toString()}`);expectError(execaSync`unicorns ${false}`);
expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${execaSync`echo foo`}`);expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${[execaSync`echo foo`, 'bar']}`);added:test-d/methods/node.test-d.ts+63 added
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263import {expectType, expectError, expectAssignable, expectNotAssignable} from 'tsd';import {execaNode, type ExecaResult, type ExecaSubprocess} from '../../index.js';
const fileUrl = new URL('file:///test');const stringArray = ['foo', 'bar'] as const;
expectError(execaNode());expectError(execaNode(true));expectError(execaNode(['unicorns', 'arg']));expectAssignable<ExecaSubprocess>(execaNode('unicorns'));expectAssignable<ExecaSubprocess>(execaNode(fileUrl));
expectAssignable<ExecaSubprocess>(execaNode('unicorns', []));expectAssignable<ExecaSubprocess>(execaNode('unicorns', ['foo']));expectError(execaNode('unicorns', 'foo'));expectError(execaNode('unicorns', [true]));
expectAssignable<ExecaSubprocess>(execaNode('unicorns', {}));expectAssignable<ExecaSubprocess>(execaNode('unicorns', [], {}));expectError(execaNode('unicorns', [], []));expectError(execaNode('unicorns', {other: true}));
expectAssignable<ExecaSubprocess>(execaNode`unicorns`);expectType<ExecaResult<{}>>(await execaNode('unicorns'));expectType<ExecaResult<{}>>(await execaNode`unicorns`);
expectAssignable<typeof execaNode>(execaNode({}));expectAssignable<ExecaSubprocess>(execaNode({})('unicorns'));expectAssignable<ExecaSubprocess>(execaNode({})`unicorns`);
expectAssignable<{stdout: string}>(await execaNode('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', {encoding: 'buffer'}));expectAssignable<{stdout: string}>(await execaNode('unicorns', ['foo']));expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', ['foo'], {encoding: 'buffer'}));expectAssignable<{stdout: string}>(await execaNode({})('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execaNode({})({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})({})('unicorns'));expectAssignable<{stdout: string}>(await execaNode({})`unicorns`);expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>(await execaNode({})({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})({})`unicorns`);
expectType<ExecaResult<{}>>(await execaNode`${'unicorns'}`);expectType<ExecaResult<{}>>(await execaNode`unicorns ${'foo'}`);expectType<ExecaResult<{}>>(await execaNode`unicorns ${'foo'} ${'bar'}`);expectType<ExecaResult<{}>>(await execaNode`unicorns ${1}`);expectType<ExecaResult<{}>>(await execaNode`unicorns ${stringArray}`);expectType<ExecaResult<{}>>(await execaNode`unicorns ${[1, 2]}`);expectType<ExecaResult<{}>>(await execaNode`unicorns ${false.toString()}`);expectError(await execaNode`unicorns ${false}`);
expectType<ExecaResult<{}>>(await execaNode`unicorns ${await execaNode`echo foo`}`);expectError(await execaNode`unicorns ${execaNode`echo foo`}`);expectType<ExecaResult<{}>>(await execaNode`unicorns ${[await execaNode`echo foo`, 'bar']}`);expectError(await execaNode`unicorns ${[execaNode`echo foo`, 'bar']}`);
expectAssignable<ExecaSubprocess>(execaNode('unicorns', {nodePath: './node'}));expectAssignable<ExecaSubprocess>(execaNode('unicorns', {nodePath: fileUrl}));expectAssignable<{stdout: string}>(await execaNode('unicorns', {nodeOptions: ['--async-stack-traces']}));expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', {nodeOptions: ['--async-stack-traces'], encoding: 'buffer'}));expectAssignable<{stdout: string}>(await execaNode('unicorns', ['foo'], {nodeOptions: ['--async-stack-traces']}));expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', ['foo'], {nodeOptions: ['--async-stack-traces'], encoding: 'buffer'}));added:test-d/methods/script-s.test-d.ts+64 added
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364import {expectType, expectError, expectAssignable} from 'tsd';import {$, type ExecaSyncResult} from '../../index.js';
const fileUrl = new URL('file:///test');const stringArray = ['foo', 'bar'] as const;
expectError($.s());expectError($.s(true));expectError($.s(['unicorns', 'arg']));expectType<ExecaSyncResult<{}>>($.s('unicorns'));expectType<ExecaSyncResult<{}>>($.s(fileUrl));
expectType<ExecaSyncResult<{}>>($.s('unicorns', []));expectType<ExecaSyncResult<{}>>($.s('unicorns', ['foo']));expectError($.s('unicorns', 'foo'));expectError($.s('unicorns', [true]));
expectType<ExecaSyncResult<{}>>($.s('unicorns', {}));expectType<ExecaSyncResult<{}>>($.s('unicorns', [], {}));expectError($.s('unicorns', [], []));expectError($.s('unicorns', {other: true}));
expectType<ExecaSyncResult<{}>>($.s`unicorns`);expectType<ExecaSyncResult<{}>>($.s('unicorns'));expectType<ExecaSyncResult<{}>>($.s`unicorns`);
expectAssignable<typeof $.s>($.s({}));expectType<ExecaSyncResult<{}>>($.s({})('unicorns'));expectType<ExecaSyncResult<{}>>($({}).s('unicorns'));expectType<ExecaSyncResult<{}>>($.s({})`unicorns`);expectType<ExecaSyncResult<{}>>($({}).s`unicorns`);
expectAssignable<{stdout: string}>($.s('unicorns'));expectAssignable<{stdout: Uint8Array}>($.s('unicorns', {encoding: 'buffer'}));expectAssignable<{stdout: string}>($.s('unicorns', ['foo']));expectAssignable<{stdout: Uint8Array}>($.s('unicorns', ['foo'], {encoding: 'buffer'}));expectAssignable<{stdout: string}>($.s({})('unicorns'));expectAssignable<{stdout: string}>($({}).s('unicorns'));expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s('unicorns'));expectAssignable<{stdout: Uint8Array}>($.s({})({encoding: 'buffer'})('unicorns'));expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).s('unicorns'));expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})({})('unicorns'));expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s({})('unicorns'));expectAssignable<{stdout: string}>($.s({})`unicorns`);expectAssignable<{stdout: string}>($({}).s`unicorns`);expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s`unicorns`);expectAssignable<{stdout: Uint8Array}>($.s({})({encoding: 'buffer'})`unicorns`);expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).s`unicorns`);expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})({})`unicorns`);expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s({})`unicorns`);
expectType<ExecaSyncResult<{}>>($.s`${'unicorns'}`);expectType<ExecaSyncResult<{}>>($.s`unicorns ${'foo'}`);expectType<ExecaSyncResult<{}>>($.s`unicorns ${'foo'} ${'bar'}`);expectType<ExecaSyncResult<{}>>($.s`unicorns ${1}`);expectType<ExecaSyncResult<{}>>($.s`unicorns ${stringArray}`);expectType<ExecaSyncResult<{}>>($.s`unicorns ${[1, 2]}`);expectType<ExecaSyncResult<{}>>($.s`unicorns ${false.toString()}`);expectError($.s`unicorns ${false}`);
expectType<ExecaSyncResult<{}>>($.s`unicorns ${$.s`echo foo`}`);expectType<ExecaSyncResult<{}>>($.s`unicorns ${[$.s`echo foo`, 'bar']}`);added:test-d/methods/script-sync.test-d.ts+64 added
1+import {expectType, expectError, expectAssignable} from 'tsd';2+import {$, type ExecaSyncResult} from '../../index.js';3+4+const fileUrl = new URL('file:///test');5+const stringArray = ['foo', 'bar'] as const;6+7+expectError($.sync());8+expectError($.sync(true));9+expectError($.sync(['unicorns', 'arg']));10+expectType<ExecaSyncResult<{}>>($.sync('unicorns'));11+expectType<ExecaSyncResult<{}>>($.sync(fileUrl));12+13+expectType<ExecaSyncResult<{}>>($.sync('unicorns', []));14+expectType<ExecaSyncResult<{}>>($.sync('unicorns', ['foo']));15+expectError($.sync('unicorns', 'foo'));16+expectError($.sync('unicorns', [true]));17+18+expectType<ExecaSyncResult<{}>>($.sync('unicorns', {}));19+expectType<ExecaSyncResult<{}>>($.sync('unicorns', [], {}));20+expectError($.sync('unicorns', [], []));21+expectError($.sync('unicorns', {other: true}));22+23+expectType<ExecaSyncResult<{}>>($.sync`unicorns`);24+expectType<ExecaSyncResult<{}>>($.sync('unicorns'));25+expectType<ExecaSyncResult<{}>>($.sync`unicorns`);26+27+expectAssignable<typeof $.sync>($.sync({}));28+expectType<ExecaSyncResult<{}>>($.sync({})('unicorns'));29+expectType<ExecaSyncResult<{}>>($({}).sync('unicorns'));30+expectType<ExecaSyncResult<{}>>($.sync({})`unicorns`);31+expectType<ExecaSyncResult<{}>>($({}).sync`unicorns`);32+33+expectAssignable<{stdout: string}>($.sync('unicorns'));34+expectAssignable<{stdout: Uint8Array}>($.sync('unicorns', {encoding: 'buffer'}));35+expectAssignable<{stdout: string}>($.sync('unicorns', ['foo']));36+expectAssignable<{stdout: Uint8Array}>($.sync('unicorns', ['foo'], {encoding: 'buffer'}));37+expectAssignable<{stdout: string}>($.sync({})('unicorns'));38+expectAssignable<{stdout: string}>($({}).sync('unicorns'));39+expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})('unicorns'));40+expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync('unicorns'));41+expectAssignable<{stdout: Uint8Array}>($.sync({})({encoding: 'buffer'})('unicorns'));42+expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).sync('unicorns'));43+expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})({})('unicorns'));44+expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync({})('unicorns'));45+expectAssignable<{stdout: string}>($.sync({})`unicorns`);46+expectAssignable<{stdout: string}>($({}).sync`unicorns`);47+expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})`unicorns`);48+expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync`unicorns`);49+expectAssignable<{stdout: Uint8Array}>($.sync({})({encoding: 'buffer'})`unicorns`);50+expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).sync`unicorns`);51+expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})({})`unicorns`);52+expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync({})`unicorns`);53+54+expectType<ExecaSyncResult<{}>>($.sync`${'unicorns'}`);55+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${'foo'}`);56+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${'foo'} ${'bar'}`);57+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${1}`);58+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${stringArray}`);59+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${[1, 2]}`);60+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${false.toString()}`);61+expectError($.sync`unicorns ${false}`);62+63+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${$.sync`echo foo`}`);64+expectType<ExecaSyncResult<{}>>($.sync`unicorns ${[$.sync`echo foo`, 'bar']}`);added:test-d/methods/script.test-d.ts+56 added
1+import {expectType, expectError, expectAssignable} from 'tsd';2+import {$, type ExecaResult, type ExecaSubprocess} from '../../index.js';3+4+const fileUrl = new URL('file:///test');5+const stringArray = ['foo', 'bar'] as const;6+7+expectError($());8+expectError($(true));9+expectError($(['unicorns', 'arg']));10+expectAssignable<ExecaSubprocess>($('unicorns'));11+expectAssignable<ExecaSubprocess>($(fileUrl));12+13+expectAssignable<ExecaSubprocess>($('unicorns', []));14+expectAssignable<ExecaSubprocess>($('unicorns', ['foo']));15+expectError($('unicorns', 'foo'));16+expectError($('unicorns', [true]));17+18+expectAssignable<ExecaSubprocess>($('unicorns', {}));19+expectAssignable<ExecaSubprocess>($('unicorns', [], {}));20+expectError($('unicorns', [], []));21+expectError($('unicorns', {other: true}));22+23+expectAssignable<ExecaSubprocess>($`unicorns`);24+expectType<ExecaResult<{}>>(await $('unicorns'));25+expectType<ExecaResult<{}>>(await $`unicorns`);26+27+expectAssignable<typeof $>($({}));28+expectAssignable<ExecaSubprocess>($({})('unicorns'));29+expectAssignable<ExecaSubprocess>($({})`unicorns`);30+31+expectAssignable<{stdout: string}>(await $('unicorns'));32+expectAssignable<{stdout: Uint8Array}>(await $('unicorns', {encoding: 'buffer'}));33+expectAssignable<{stdout: string}>(await $('unicorns', ['foo']));34+expectAssignable<{stdout: Uint8Array}>(await $('unicorns', ['foo'], {encoding: 'buffer'}));35+expectAssignable<{stdout: string}>(await $({})('unicorns'));36+expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})('unicorns'));37+expectAssignable<{stdout: Uint8Array}>(await $({})({encoding: 'buffer'})('unicorns'));38+expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})({})('unicorns'));39+expectAssignable<{stdout: string}>(await $({})`unicorns`);40+expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})`unicorns`);41+expectAssignable<{stdout: Uint8Array}>(await $({})({encoding: 'buffer'})`unicorns`);42+expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})({})`unicorns`);43+44+expectType<ExecaResult<{}>>(await $`${'unicorns'}`);45+expectType<ExecaResult<{}>>(await $`unicorns ${'foo'}`);46+expectType<ExecaResult<{}>>(await $`unicorns ${'foo'} ${'bar'}`);47+expectType<ExecaResult<{}>>(await $`unicorns ${1}`);48+expectType<ExecaResult<{}>>(await $`unicorns ${stringArray}`);49+expectType<ExecaResult<{}>>(await $`unicorns ${[1, 2]}`);50+expectType<ExecaResult<{}>>(await $`unicorns ${false.toString()}`);51+expectError(await $`unicorns ${false}`);52+53+expectType<ExecaResult<{}>>(await $`unicorns ${await $`echo foo`}`);54+expectError(await $`unicorns ${$`echo foo`}`);55+expectType<ExecaResult<{}>>(await $`unicorns ${[await $`echo foo`, 'bar']}`);56+expectError(await $`unicorns ${[$`echo foo`, 'bar']}`);added:test-d/return/ignore-option.test-d.ts+143 added
1+import {type Readable, type Writable} from 'node:stream';2+import {expectType, expectError} from 'tsd';3+import {execa, execaSync, type ExecaError, type ExecaSyncError} from '../../index.js';4+5+const ignoreAnyPromise = execa('unicorns', {stdin: 'ignore', stdout: 'ignore', stderr: 'ignore', all: true});6+expectType<null>(ignoreAnyPromise.stdin);7+expectType<null>(ignoreAnyPromise.stdio[0]);8+expectType<null>(ignoreAnyPromise.stdout);9+expectType<null>(ignoreAnyPromise.stdio[1]);10+expectType<null>(ignoreAnyPromise.stderr);11+expectType<null>(ignoreAnyPromise.stdio[2]);12+expectType<undefined>(ignoreAnyPromise.all);13+expectError(ignoreAnyPromise.stdio[3].destroy());14+15+const ignoreAnyResult = await ignoreAnyPromise;16+expectType<undefined>(ignoreAnyResult.stdout);17+expectType<undefined>(ignoreAnyResult.stdio[1]);18+expectType<undefined>(ignoreAnyResult.stderr);19+expectType<undefined>(ignoreAnyResult.stdio[2]);20+expectType<undefined>(ignoreAnyResult.all);21+22+const ignoreAllPromise = execa('unicorns', {stdio: 'ignore', all: true});23+expectType<null>(ignoreAllPromise.stdin);24+expectType<null>(ignoreAllPromise.stdio[0]);25+expectType<null>(ignoreAllPromise.stdout);26+expectType<null>(ignoreAllPromise.stdio[1]);27+expectType<null>(ignoreAllPromise.stderr);28+expectType<null>(ignoreAllPromise.stdio[2]);29+expectType<undefined>(ignoreAllPromise.all);30+expectError(ignoreAllPromise.stdio[3].destroy());31+32+const ignoreAllResult = await ignoreAllPromise;33+expectType<undefined>(ignoreAllResult.stdout);34+expectType<undefined>(ignoreAllResult.stdio[1]);35+expectType<undefined>(ignoreAllResult.stderr);36+expectType<undefined>(ignoreAllResult.stdio[2]);37+expectType<undefined>(ignoreAllResult.all);38+39+const ignoreStdioArrayPromise = execa('unicorns', {stdio: ['ignore', 'ignore', 'pipe', 'pipe'], all: true});40+expectType<null>(ignoreStdioArrayPromise.stdin);41+expectType<null>(ignoreStdioArrayPromise.stdio[0]);42+expectType<null>(ignoreStdioArrayPromise.stdout);43+expectType<null>(ignoreStdioArrayPromise.stdio[1]);44+expectType<Readable>(ignoreStdioArrayPromise.stderr);45+expectType<Readable>(ignoreStdioArrayPromise.stdio[2]);46+expectType<Readable>(ignoreStdioArrayPromise.all);47+expectType<Readable>(ignoreStdioArrayPromise.stdio[3]);48+const ignoreStdioArrayResult = await ignoreStdioArrayPromise;49+expectType<undefined>(ignoreStdioArrayResult.stdout);50+expectType<undefined>(ignoreStdioArrayResult.stdio[1]);51+expectType<string>(ignoreStdioArrayResult.stderr);52+expectType<string>(ignoreStdioArrayResult.stdio[2]);53+expectType<string>(ignoreStdioArrayResult.all);54+55+const ignoreStdioArrayReadPromise = execa('unicorns', {stdio: ['ignore', 'ignore', 'pipe', new Uint8Array()], all: true});56+expectType<Writable>(ignoreStdioArrayReadPromise.stdio[3]);57+58+const ignoreStdinPromise = execa('unicorns', {stdin: 'ignore'});59+expectType<null>(ignoreStdinPromise.stdin);60+61+const ignoreStdoutPromise = execa('unicorns', {stdout: 'ignore', all: true});62+expectType<Writable>(ignoreStdoutPromise.stdin);63+expectType<Writable>(ignoreStdoutPromise.stdio[0]);64+expectType<null>(ignoreStdoutPromise.stdout);65+expectType<null>(ignoreStdoutPromise.stdio[1]);66+expectType<Readable>(ignoreStdoutPromise.stderr);67+expectType<Readable>(ignoreStdoutPromise.stdio[2]);68+expectType<Readable>(ignoreStdoutPromise.all);69+expectError(ignoreStdoutPromise.stdio[3].destroy());70+71+const ignoreStdoutResult = await ignoreStdoutPromise;72+expectType<undefined>(ignoreStdoutResult.stdout);73+expectType<string>(ignoreStdoutResult.stderr);74+expectType<string>(ignoreStdoutResult.all);75+76+const ignoreStderrPromise = execa('unicorns', {stderr: 'ignore', all: true});77+expectType<Writable>(ignoreStderrPromise.stdin);78+expectType<Writable>(ignoreStderrPromise.stdio[0]);79+expectType<Readable>(ignoreStderrPromise.stdout);80+expectType<Readable>(ignoreStderrPromise.stdio[1]);81+expectType<null>(ignoreStderrPromise.stderr);82+expectType<null>(ignoreStderrPromise.stdio[2]);83+expectType<Readable>(ignoreStderrPromise.all);84+expectError(ignoreStderrPromise.stdio[3].destroy());85+86+const ignoreStderrResult = await ignoreStderrPromise;87+expectType<string>(ignoreStderrResult.stdout);88+expectType<undefined>(ignoreStderrResult.stderr);89+expectType<string>(ignoreStderrResult.all);90+91+const ignoreStdioPromise = execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore'], all: true});92+expectType<Writable>(ignoreStdioPromise.stdin);93+expectType<Writable>(ignoreStdioPromise.stdio[0]);94+expectType<Readable>(ignoreStdioPromise.stdout);95+expectType<Readable>(ignoreStdioPromise.stdio[1]);96+expectType<Readable>(ignoreStdioPromise.stderr);97+expectType<Readable>(ignoreStdioPromise.stdio[2]);98+expectType<Readable>(ignoreStdioPromise.all);99+expectType<null>(ignoreStdioPromise.stdio[3]);100+101+const ignoreStdioResult = await ignoreStdioPromise;102+expectType<string>(ignoreStdioResult.stdout);103+expectType<string>(ignoreStdioResult.stderr);104+expectType<string>(ignoreStdioResult.all);105+106+const ignoreStdoutResultSync = execaSync('unicorns', {stdout: 'ignore', all: true});107+expectType<undefined>(ignoreStdoutResultSync.stdout);108+expectType<undefined>(ignoreStdoutResultSync.stdio[1]);109+expectType<string>(ignoreStdoutResultSync.stderr);110+expectType<string>(ignoreStdoutResultSync.stdio[2]);111+expectType<string>(ignoreStdoutResultSync.all);112+113+const ignoreStderrResultSync = execaSync('unicorns', {stderr: 'ignore', all: true});114+expectType<string>(ignoreStderrResultSync.stdout);115+expectType<undefined>(ignoreStderrResultSync.stderr);116+expectType<string>(ignoreStderrResultSync.all);117+118+const ignoreFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});119+expectType<undefined>(ignoreFd3Result.stdio[3]);120+121+const ignoreStdoutError = new Error('.') as ExecaError<{stdout: 'ignore'; all: true}>;122+expectType<undefined>(ignoreStdoutError.stdout);123+expectType<undefined>(ignoreStdoutError.stdio[1]);124+expectType<string>(ignoreStdoutError.stderr);125+expectType<string>(ignoreStdoutError.stdio[2]);126+expectType<string>(ignoreStdoutError.all);127+128+const ignoreStderrError = new Error('.') as ExecaError<{stderr: 'ignore'; all: true}>;129+expectType<string>(ignoreStderrError.stdout);130+expectType<undefined>(ignoreStderrError.stderr);131+expectType<string>(ignoreStderrError.all);132+133+const ignoreStdoutErrorSync = new Error('.') as ExecaSyncError<{stdout: 'ignore'; all: true}>;134+expectType<undefined>(ignoreStdoutErrorSync.stdout);135+expectType<undefined>(ignoreStdoutErrorSync.stdio[1]);136+expectType<string>(ignoreStdoutErrorSync.stderr);137+expectType<string>(ignoreStdoutErrorSync.stdio[2]);138+expectType<string>(ignoreStdoutErrorSync.all);139+140+const ignoreStderrErrorSync = new Error('.') as ExecaSyncError<{stderr: 'ignore'; all: true}>;141+expectType<string>(ignoreStderrErrorSync.stdout);142+expectType<undefined>(ignoreStderrErrorSync.stderr);143+expectType<string>(ignoreStderrErrorSync.all);added:test-d/return/ignore-other.test-d.ts+153 added
1+import * as process from 'node:process';2+import {expectType} from 'tsd';3+import {execa, execaSync, type ExecaError, type ExecaSyncError} from '../../index.js';4+5+const inheritStdoutResult = await execa('unicorns', {stdout: 'inherit', all: true});6+expectType<undefined>(inheritStdoutResult.stdout);7+expectType<string>(inheritStdoutResult.stderr);8+expectType<string>(inheritStdoutResult.all);9+10+const inheritStderrResult = await execa('unicorns', {stderr: 'inherit', all: true});11+expectType<string>(inheritStderrResult.stdout);12+expectType<undefined>(inheritStderrResult.stderr);13+expectType<string>(inheritStderrResult.all);14+15+const inheritArrayStdoutResult = await execa('unicorns', {stdout: ['inherit'] as ['inherit'], all: true});16+expectType<undefined>(inheritArrayStdoutResult.stdout);17+expectType<string>(inheritArrayStdoutResult.stderr);18+expectType<string>(inheritArrayStdoutResult.all);19+20+const inheritArrayStderrResult = await execa('unicorns', {stderr: ['inherit'] as ['inherit'], all: true});21+expectType<string>(inheritArrayStderrResult.stdout);22+expectType<undefined>(inheritArrayStderrResult.stderr);23+expectType<string>(inheritArrayStderrResult.all);24+25+const inheritStdoutResultSync = execaSync('unicorns', {stdout: 'inherit', all: true});26+expectType<undefined>(inheritStdoutResultSync.stdout);27+expectType<string>(inheritStdoutResultSync.stderr);28+expectType<string>(inheritStdoutResultSync.all);29+30+const inheritStderrResultSync = execaSync('unicorns', {stderr: 'inherit', all: true});31+expectType<string>(inheritStderrResultSync.stdout);32+expectType<undefined>(inheritStderrResultSync.stderr);33+expectType<string>(inheritStderrResultSync.all);34+35+const inheritStdoutError = new Error('.') as ExecaError<{stdout: 'inherit'; all: true}>;36+expectType<undefined>(inheritStdoutError.stdout);37+expectType<string>(inheritStdoutError.stderr);38+expectType<string>(inheritStdoutError.all);39+40+const inheritStderrError = new Error('.') as ExecaError<{stderr: 'inherit'; all: true}>;41+expectType<string>(inheritStderrError.stdout);42+expectType<undefined>(inheritStderrError.stderr);43+expectType<string>(inheritStderrError.all);44+45+const inheritStdoutErrorSync = new Error('.') as ExecaSyncError<{stdout: 'inherit'; all: true}>;46+expectType<undefined>(inheritStdoutErrorSync.stdout);47+expectType<string>(inheritStdoutErrorSync.stderr);48+expectType<string>(inheritStdoutErrorSync.all);49+50+const inheritStderrErrorSync = new Error('.') as ExecaSyncError<{stderr: 'inherit'; all: true}>;51+expectType<string>(inheritStderrErrorSync.stdout);52+expectType<undefined>(inheritStderrErrorSync.stderr);53+expectType<string>(inheritStderrErrorSync.all);54+55+const ipcStdoutResult = await execa('unicorns', {stdout: 'ipc', all: true});56+expectType<undefined>(ipcStdoutResult.stdout);57+expectType<string>(ipcStdoutResult.stderr);58+expectType<string>(ipcStdoutResult.all);59+60+const ipcStderrResult = await execa('unicorns', {stderr: 'ipc', all: true});61+expectType<string>(ipcStderrResult.stdout);62+expectType<undefined>(ipcStderrResult.stderr);63+expectType<string>(ipcStderrResult.all);64+65+const ipcStdoutError = new Error('.') as ExecaError<{stdout: 'ipc'; all: true}>;66+expectType<undefined>(ipcStdoutError.stdout);67+expectType<string>(ipcStdoutError.stderr);68+expectType<string>(ipcStdoutError.all);69+70+const ipcStderrError = new Error('.') as ExecaError<{stderr: 'ipc'; all: true}>;71+expectType<string>(ipcStderrError.stdout);72+expectType<undefined>(ipcStderrError.stderr);73+expectType<string>(ipcStderrError.all);74+75+const streamStdoutResult = await execa('unicorns', {stdout: process.stdout, all: true});76+expectType<undefined>(streamStdoutResult.stdout);77+expectType<string>(streamStdoutResult.stderr);78+expectType<string>(streamStdoutResult.all);79+80+const streamArrayStdoutResult = await execa('unicorns', {stdout: [process.stdout] as [typeof process.stdout], all: true});81+expectType<undefined>(streamArrayStdoutResult.stdout);82+expectType<string>(streamArrayStdoutResult.stderr);83+expectType<string>(streamArrayStdoutResult.all);84+85+const streamStderrResult = await execa('unicorns', {stderr: process.stdout, all: true});86+expectType<string>(streamStderrResult.stdout);87+expectType<undefined>(streamStderrResult.stderr);88+expectType<string>(streamStderrResult.all);89+90+const streamArrayStderrResult = await execa('unicorns', {stderr: [process.stdout] as [typeof process.stdout], all: true});91+expectType<string>(streamArrayStderrResult.stdout);92+expectType<undefined>(streamArrayStderrResult.stderr);93+expectType<string>(streamArrayStderrResult.all);94+95+const streamStdoutError = new Error('.') as ExecaError<{stdout: typeof process.stdout; all: true}>;96+expectType<undefined>(streamStdoutError.stdout);97+expectType<string>(streamStdoutError.stderr);98+expectType<string>(streamStdoutError.all);99+100+const streamStderrError = new Error('.') as ExecaError<{stderr: typeof process.stdout; all: true}>;101+expectType<string>(streamStderrError.stdout);102+expectType<undefined>(streamStderrError.stderr);103+expectType<string>(streamStderrError.all);104+105+const numberStdoutResult = await execa('unicorns', {stdout: 1, all: true});106+expectType<undefined>(numberStdoutResult.stdout);107+expectType<string>(numberStdoutResult.stderr);108+expectType<string>(numberStdoutResult.all);109+110+const numberStderrResult = await execa('unicorns', {stderr: 1, all: true});111+expectType<string>(numberStderrResult.stdout);112+expectType<undefined>(numberStderrResult.stderr);113+expectType<string>(numberStderrResult.all);114+115+const numberArrayStdoutResult = await execa('unicorns', {stdout: [1] as [1], all: true});116+expectType<undefined>(numberArrayStdoutResult.stdout);117+expectType<string>(numberArrayStdoutResult.stderr);118+expectType<string>(numberArrayStdoutResult.all);119+120+const numberArrayStderrResult = await execa('unicorns', {stderr: [1] as [1], all: true});121+expectType<string>(numberArrayStderrResult.stdout);122+expectType<undefined>(numberArrayStderrResult.stderr);123+expectType<string>(numberArrayStderrResult.all);124+125+const numberStdoutResultSync = execaSync('unicorns', {stdout: 1, all: true});126+expectType<undefined>(numberStdoutResultSync.stdout);127+expectType<string>(numberStdoutResultSync.stderr);128+expectType<string>(numberStdoutResultSync.all);129+130+const numberStderrResultSync = execaSync('unicorns', {stderr: 1, all: true});131+expectType<string>(numberStderrResultSync.stdout);132+expectType<undefined>(numberStderrResultSync.stderr);133+expectType<string>(numberStderrResultSync.all);134+135+const numberStdoutError = new Error('.') as ExecaError<{stdout: 1; all: true}>;136+expectType<undefined>(numberStdoutError.stdout);137+expectType<string>(numberStdoutError.stderr);138+expectType<string>(numberStdoutError.all);139+140+const numberStderrError = new Error('.') as ExecaError<{stderr: 1; all: true}>;141+expectType<string>(numberStderrError.stdout);142+expectType<undefined>(numberStderrError.stderr);143+expectType<string>(numberStderrError.all);144+145+const numberStdoutErrorSync = new Error('.') as ExecaSyncError<{stdout: 1; all: true}>;146+expectType<undefined>(numberStdoutErrorSync.stdout);147+expectType<string>(numberStdoutErrorSync.stderr);148+expectType<string>(numberStdoutErrorSync.all);149+150+const numberStderrErrorSync = new Error('.') as ExecaSyncError<{stderr: 1; all: true}>;151+expectType<string>(numberStderrErrorSync.stdout);152+expectType<undefined>(numberStderrErrorSync.stderr);153+expectType<string>(numberStderrErrorSync.all);added:test-d/return/lines-main.test-d.ts+68 added
1+import {expectType} from 'tsd';2+import {execa, execaSync, type ExecaError, type ExecaSyncError} from '../../index.js';3+4+const linesResult = await execa('unicorns', {lines: true, all: true});5+expectType<string[]>(linesResult.stdout);6+expectType<string[]>(linesResult.stdio[1]);7+expectType<string[]>(linesResult.stderr);8+expectType<string[]>(linesResult.stdio[2]);9+expectType<string[]>(linesResult.all);10+11+const linesBufferResult = await execa('unicorns', {lines: true, encoding: 'buffer', all: true});12+expectType<Uint8Array>(linesBufferResult.stdout);13+expectType<Uint8Array>(linesBufferResult.stdio[1]);14+expectType<Uint8Array>(linesBufferResult.stderr);15+expectType<Uint8Array>(linesBufferResult.stdio[2]);16+expectType<Uint8Array>(linesBufferResult.all);17+18+const linesHexResult = await execa('unicorns', {lines: true, encoding: 'hex', all: true});19+expectType<string>(linesHexResult.stdout);20+expectType<string>(linesHexResult.stdio[1]);21+expectType<string>(linesHexResult.stderr);22+expectType<string>(linesHexResult.stdio[2]);23+expectType<string>(linesHexResult.all);24+25+const linesFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], lines: true});26+expectType<string[]>(linesFd3Result.stdio[3]);27+28+const linesBufferFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], lines: true, encoding: 'buffer'});29+expectType<Uint8Array>(linesBufferFd3Result.stdio[3]);30+31+const execaLinesError = new Error('.') as ExecaError<{lines: true; all: true}>;32+expectType<string[]>(execaLinesError.stdout);33+expectType<string[]>(execaLinesError.stdio[1]);34+expectType<string[]>(execaLinesError.stderr);35+expectType<string[]>(execaLinesError.stdio[2]);36+expectType<string[]>(execaLinesError.all);37+38+const execaLinesBufferError = new Error('.') as ExecaError<{lines: true; encoding: 'buffer'; all: true}>;39+expectType<Uint8Array>(execaLinesBufferError.stdout);40+expectType<Uint8Array>(execaLinesBufferError.stdio[1]);41+expectType<Uint8Array>(execaLinesBufferError.stderr);42+expectType<Uint8Array>(execaLinesBufferError.stdio[2]);43+expectType<Uint8Array>(execaLinesBufferError.all);44+45+const linesResultSync = execaSync('unicorns', {lines: true, all: true});46+expectType<string[]>(linesResultSync.stdout);47+expectType<string[]>(linesResultSync.stderr);48+expectType<string[]>(linesResultSync.all);49+50+const linesBufferResultSync = execaSync('unicorns', {lines: true, encoding: 'buffer', all: true});51+expectType<Uint8Array>(linesBufferResultSync.stdout);52+expectType<Uint8Array>(linesBufferResultSync.stderr);53+expectType<Uint8Array>(linesBufferResultSync.all);54+55+const linesHexResultSync = execaSync('unicorns', {lines: true, encoding: 'hex', all: true});56+expectType<string>(linesHexResultSync.stdout);57+expectType<string>(linesHexResultSync.stderr);58+expectType<string>(linesHexResultSync.all);59+60+const execaLinesErrorSync = new Error('.') as ExecaSyncError<{lines: true; all: true}>;61+expectType<string[]>(execaLinesErrorSync.stdout);62+expectType<string[]>(execaLinesErrorSync.stderr);63+expectType<string[]>(execaLinesErrorSync.all);64+65+const execaLinesBufferErrorSync = new Error('.') as ExecaSyncError<{lines: true; encoding: 'buffer'; all: true}>;66+expectType<Uint8Array>(execaLinesBufferErrorSync.stdout);67+expectType<Uint8Array>(execaLinesBufferErrorSync.stderr);68+expectType<Uint8Array>(execaLinesBufferErrorSync.all);added:test-d/return/lines-specific.test-d.ts+90 added
1+import {expectType} from 'tsd';2+import {execa, execaSync} from '../../index.js';3+4+const linesStdoutResult = await execa('unicorns', {all: true, lines: {stdout: true}});5+expectType<string[]>(linesStdoutResult.stdout);6+expectType<string[]>(linesStdoutResult.stdio[1]);7+expectType<string>(linesStdoutResult.stderr);8+expectType<string>(linesStdoutResult.stdio[2]);9+expectType<string[]>(linesStdoutResult.all);10+11+const linesStderrResult = await execa('unicorns', {all: true, lines: {stderr: true}});12+expectType<string>(linesStderrResult.stdout);13+expectType<string>(linesStderrResult.stdio[1]);14+expectType<string[]>(linesStderrResult.stderr);15+expectType<string[]>(linesStderrResult.stdio[2]);16+expectType<string[]>(linesStderrResult.all);17+18+const linesFd1Result = await execa('unicorns', {all: true, lines: {fd1: true}});19+expectType<string[]>(linesFd1Result.stdout);20+expectType<string[]>(linesFd1Result.stdio[1]);21+expectType<string>(linesFd1Result.stderr);22+expectType<string>(linesFd1Result.stdio[2]);23+expectType<string[]>(linesFd1Result.all);24+25+const linesFd2Result = await execa('unicorns', {all: true, lines: {fd2: true}});26+expectType<string>(linesFd2Result.stdout);27+expectType<string>(linesFd2Result.stdio[1]);28+expectType<string[]>(linesFd2Result.stderr);29+expectType<string[]>(linesFd2Result.stdio[2]);30+expectType<string[]>(linesFd2Result.all);31+32+const linesAllResult = await execa('unicorns', {all: true, lines: {all: true}});33+expectType<string[]>(linesAllResult.stdout);34+expectType<string[]>(linesAllResult.stdio[1]);35+expectType<string[]>(linesAllResult.stderr);36+expectType<string[]>(linesAllResult.stdio[2]);37+expectType<string[]>(linesAllResult.all);38+39+const linesFd3Result = await execa('unicorns', {all: true, lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});40+expectType<string>(linesFd3Result.stdout);41+expectType<string>(linesFd3Result.stdio[1]);42+expectType<string>(linesFd3Result.stderr);43+expectType<string>(linesFd3Result.stdio[2]);44+expectType<string>(linesFd3Result.all);45+expectType<string[]>(linesFd3Result.stdio[3]);46+expectType<string>(linesFd3Result.stdio[4]);47+48+const linesStdoutResultSync = execaSync('unicorns', {all: true, lines: {stdout: true}});49+expectType<string[]>(linesStdoutResultSync.stdout);50+expectType<string[]>(linesStdoutResultSync.stdio[1]);51+expectType<string>(linesStdoutResultSync.stderr);52+expectType<string>(linesStdoutResultSync.stdio[2]);53+expectType<string[]>(linesStdoutResultSync.all);54+55+const linesStderrResultSync = execaSync('unicorns', {all: true, lines: {stderr: true}});56+expectType<string>(linesStderrResultSync.stdout);57+expectType<string>(linesStderrResultSync.stdio[1]);58+expectType<string[]>(linesStderrResultSync.stderr);59+expectType<string[]>(linesStderrResultSync.stdio[2]);60+expectType<string[]>(linesStderrResultSync.all);61+62+const linesFd1ResultSync = execaSync('unicorns', {all: true, lines: {fd1: true}});63+expectType<string[]>(linesFd1ResultSync.stdout);64+expectType<string[]>(linesFd1ResultSync.stdio[1]);65+expectType<string>(linesFd1ResultSync.stderr);66+expectType<string>(linesFd1ResultSync.stdio[2]);67+expectType<string[]>(linesFd1ResultSync.all);68+69+const linesFd2ResultSync = execaSync('unicorns', {all: true, lines: {fd2: true}});70+expectType<string>(linesFd2ResultSync.stdout);71+expectType<string>(linesFd2ResultSync.stdio[1]);72+expectType<string[]>(linesFd2ResultSync.stderr);73+expectType<string[]>(linesFd2ResultSync.stdio[2]);74+expectType<string[]>(linesFd2ResultSync.all);75+76+const linesAllResultSync = execaSync('unicorns', {all: true, lines: {all: true}});77+expectType<string[]>(linesAllResultSync.stdout);78+expectType<string[]>(linesAllResultSync.stdio[1]);79+expectType<string[]>(linesAllResultSync.stderr);80+expectType<string[]>(linesAllResultSync.stdio[2]);81+expectType<string[]>(linesAllResultSync.all);82+83+const linesFd3ResultSync = execaSync('unicorns', {all: true, lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});84+expectType<string>(linesFd3ResultSync.stdout);85+expectType<string>(linesFd3ResultSync.stdio[1]);86+expectType<string>(linesFd3ResultSync.stderr);87+expectType<string>(linesFd3ResultSync.stdio[2]);88+expectType<string>(linesFd3ResultSync.all);89+expectType<string[]>(linesFd3ResultSync.stdio[3]);90+expectType<string>(linesFd3ResultSync.stdio[4]);added:test-d/return/no-buffer-main.test-d.ts+40 added
1+import type {Readable, Writable} from 'node:stream';2+import {expectType, expectError} from 'tsd';3+import {execa, execaSync, type ExecaError, type ExecaSyncError} from '../../index.js';4+5+const noBufferPromise = execa('unicorns', {buffer: false, all: true});6+expectType<Writable>(noBufferPromise.stdin);7+expectType<Writable>(noBufferPromise.stdio[0]);8+expectType<Readable>(noBufferPromise.stdout);9+expectType<Readable>(noBufferPromise.stdio[1]);10+expectType<Readable>(noBufferPromise.stderr);11+expectType<Readable>(noBufferPromise.stdio[2]);12+expectType<Readable>(noBufferPromise.all);13+expectError(noBufferPromise.stdio[3].destroy());14+15+const noBufferResult = await noBufferPromise;16+expectType<undefined>(noBufferResult.stdout);17+expectType<undefined>(noBufferResult.stdio[1]);18+expectType<undefined>(noBufferResult.stderr);19+expectType<undefined>(noBufferResult.stdio[2]);20+expectType<undefined>(noBufferResult.all);21+22+const noBufferResultSync = execaSync('unicorns', {buffer: false, all: true});23+expectType<undefined>(noBufferResultSync.stdout);24+expectType<undefined>(noBufferResultSync.stderr);25+expectType<undefined>(noBufferResultSync.all);26+27+const noBuffer3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], buffer: false});28+expectType<undefined>(noBuffer3Result.stdio[3]);29+30+const noBufferError = new Error('.') as ExecaError<{buffer: false; all: true}>;31+expectType<undefined>(noBufferError.stdout);32+expectType<undefined>(noBufferError.stdio[1]);33+expectType<undefined>(noBufferError.stderr);34+expectType<undefined>(noBufferError.stdio[2]);35+expectType<undefined>(noBufferError.all);36+37+const noBufferErrorSync = new Error('.') as ExecaSyncError<{buffer: false; all: true}>;38+expectType<undefined>(noBufferErrorSync.stdout);39+expectType<undefined>(noBufferErrorSync.stderr);40+expectType<undefined>(noBufferErrorSync.all);added:test-d/return/no-buffer-specific.test-d.ts+90 added
1+import {expectType} from 'tsd';2+import {execa, execaSync} from '../../index.js';3+4+const noBufferStdoutResult = await execa('unicorns', {all: true, buffer: {stdout: false}});5+expectType<undefined>(noBufferStdoutResult.stdout);6+expectType<undefined>(noBufferStdoutResult.stdio[1]);7+expectType<string>(noBufferStdoutResult.stderr);8+expectType<string>(noBufferStdoutResult.stdio[2]);9+expectType<string>(noBufferStdoutResult.all);10+11+const noBufferStderrResult = await execa('unicorns', {all: true, buffer: {stderr: false}});12+expectType<string>(noBufferStderrResult.stdout);13+expectType<string>(noBufferStderrResult.stdio[1]);14+expectType<undefined>(noBufferStderrResult.stderr);15+expectType<undefined>(noBufferStderrResult.stdio[2]);16+expectType<string>(noBufferStderrResult.all);17+18+const noBufferFd1Result = await execa('unicorns', {all: true, buffer: {fd1: false}});19+expectType<undefined>(noBufferFd1Result.stdout);20+expectType<undefined>(noBufferFd1Result.stdio[1]);21+expectType<string>(noBufferFd1Result.stderr);22+expectType<string>(noBufferFd1Result.stdio[2]);23+expectType<string>(noBufferFd1Result.all);24+25+const noBufferFd2Result = await execa('unicorns', {all: true, buffer: {fd2: false}});26+expectType<string>(noBufferFd2Result.stdout);27+expectType<string>(noBufferFd2Result.stdio[1]);28+expectType<undefined>(noBufferFd2Result.stderr);29+expectType<undefined>(noBufferFd2Result.stdio[2]);30+expectType<string>(noBufferFd2Result.all);31+32+const noBufferAllResult = await execa('unicorns', {all: true, buffer: {all: false}});33+expectType<undefined>(noBufferAllResult.stdout);34+expectType<undefined>(noBufferAllResult.stdio[1]);35+expectType<undefined>(noBufferAllResult.stderr);36+expectType<undefined>(noBufferAllResult.stdio[2]);37+expectType<undefined>(noBufferAllResult.all);38+39+const noBufferFd3Result = await execa('unicorns', {all: true, buffer: {fd3: false}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});40+expectType<string>(noBufferFd3Result.stdout);41+expectType<string>(noBufferFd3Result.stdio[1]);42+expectType<string>(noBufferFd3Result.stderr);43+expectType<string>(noBufferFd3Result.stdio[2]);44+expectType<string>(noBufferFd3Result.all);45+expectType<undefined>(noBufferFd3Result.stdio[3]);46+expectType<string>(noBufferFd3Result.stdio[4]);47+48+const noBufferStdoutResultSync = execaSync('unicorns', {all: true, buffer: {stdout: false}});49+expectType<undefined>(noBufferStdoutResultSync.stdout);50+expectType<undefined>(noBufferStdoutResultSync.stdio[1]);51+expectType<string>(noBufferStdoutResultSync.stderr);52+expectType<string>(noBufferStdoutResultSync.stdio[2]);53+expectType<string>(noBufferStdoutResultSync.all);54+55+const noBufferStderrResultSync = execaSync('unicorns', {all: true, buffer: {stderr: false}});56+expectType<string>(noBufferStderrResultSync.stdout);57+expectType<string>(noBufferStderrResultSync.stdio[1]);58+expectType<undefined>(noBufferStderrResultSync.stderr);59+expectType<undefined>(noBufferStderrResultSync.stdio[2]);60+expectType<string>(noBufferStderrResultSync.all);61+62+const noBufferFd1ResultSync = execaSync('unicorns', {all: true, buffer: {fd1: false}});63+expectType<undefined>(noBufferFd1ResultSync.stdout);64+expectType<undefined>(noBufferFd1ResultSync.stdio[1]);65+expectType<string>(noBufferFd1ResultSync.stderr);66+expectType<string>(noBufferFd1ResultSync.stdio[2]);67+expectType<string>(noBufferFd1ResultSync.all);68+69+const noBufferFd2ResultSync = execaSync('unicorns', {all: true, buffer: {fd2: false}});70+expectType<string>(noBufferFd2ResultSync.stdout);71+expectType<string>(noBufferFd2ResultSync.stdio[1]);72+expectType<undefined>(noBufferFd2ResultSync.stderr);73+expectType<undefined>(noBufferFd2ResultSync.stdio[2]);74+expectType<string>(noBufferFd2ResultSync.all);75+76+const noBufferAllResultSync = execaSync('unicorns', {all: true, buffer: {all: false}});77+expectType<undefined>(noBufferAllResultSync.stdout);78+expectType<undefined>(noBufferAllResultSync.stdio[1]);79+expectType<undefined>(noBufferAllResultSync.stderr);80+expectType<undefined>(noBufferAllResultSync.stdio[2]);81+expectType<undefined>(noBufferAllResultSync.all);82+83+const noBufferFd3ResultSync = execaSync('unicorns', {all: true, buffer: {fd3: false}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});84+expectType<string>(noBufferFd3ResultSync.stdout);85+expectType<string>(noBufferFd3ResultSync.stdio[1]);86+expectType<string>(noBufferFd3ResultSync.stderr);87+expectType<string>(noBufferFd3ResultSync.stdio[2]);88+expectType<string>(noBufferFd3ResultSync.all);89+expectType<undefined>(noBufferFd3ResultSync.stdio[3]);90+expectType<string>(noBufferFd3ResultSync.stdio[4]);added:test-d/return/result-all.test-d.ts+26 added
1+import {expectType} from 'tsd';2+import {execa, execaSync, type ExecaError, type ExecaSyncError} from '../../index.js';3+4+const allResult = await execa('unicorns', {all: true});5+expectType<string>(allResult.all);6+7+const noAllResult = await execa('unicorns');8+expectType<undefined>(noAllResult.all);9+10+const allResultSync = execaSync('unicorns', {all: true});11+expectType<string>(allResultSync.all);12+13+const noAllResultSync = execaSync('unicorns');14+expectType<undefined>(noAllResultSync.all);15+16+const allError = new Error('.') as ExecaError<{all: true}>;17+expectType<string>(allError.all);18+19+const noAllError = new Error('.') as ExecaError<{}>;20+expectType<undefined>(noAllError.all);21+22+const allErrorSync = new Error('.') as ExecaError<{all: true}>;23+expectType<string>(allErrorSync.all);24+25+const noAllErrorSync = new Error('.') as ExecaSyncError<{}>;26+expectType<undefined>(noAllErrorSync.all);added:test-d/return/result-main.test-d.ts+95 added
1+import {expectType, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ ExecaError,6+ ExecaSyncError,7+ type ExecaResult,8+ type ExecaSyncResult,9+} from '../../index.js';10+11+type AnyChunk = string | Uint8Array | string[] | unknown[] | undefined;12+expectType<AnyChunk>({} as ExecaResult['stdout']);13+expectType<AnyChunk>({} as ExecaResult['stderr']);14+expectType<AnyChunk>({} as ExecaResult['all']);15+expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as ExecaResult['stdio']);16+expectType<AnyChunk>({} as ExecaSyncResult['stdout']);17+expectType<AnyChunk>({} as ExecaSyncResult['stderr']);18+expectType<AnyChunk>({} as ExecaSyncResult['all']);19+expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as ExecaSyncResult['stdio']);20+21+const unicornsResult = await execa('unicorns', {all: true});22+expectAssignable<ExecaResult>(unicornsResult);23+expectType<string>(unicornsResult.command);24+expectType<string>(unicornsResult.escapedCommand);25+expectType<number | undefined>(unicornsResult.exitCode);26+expectType<boolean>(unicornsResult.failed);27+expectType<boolean>(unicornsResult.timedOut);28+expectType<boolean>(unicornsResult.isCanceled);29+expectType<boolean>(unicornsResult.isTerminated);30+expectType<boolean>(unicornsResult.isMaxBuffer);31+expectType<string | undefined>(unicornsResult.signal);32+expectType<string | undefined>(unicornsResult.signalDescription);33+expectType<string>(unicornsResult.cwd);34+expectType<number>(unicornsResult.durationMs);35+expectType<ExecaResult[]>(unicornsResult.pipedFrom);36+37+const unicornsResultSync = execaSync('unicorns', {all: true});38+expectAssignable<ExecaSyncResult>(unicornsResultSync);39+expectType<string>(unicornsResultSync.command);40+expectType<string>(unicornsResultSync.escapedCommand);41+expectType<number | undefined>(unicornsResultSync.exitCode);42+expectType<boolean>(unicornsResultSync.failed);43+expectType<boolean>(unicornsResultSync.timedOut);44+expectType<boolean>(unicornsResultSync.isCanceled);45+expectType<boolean>(unicornsResultSync.isTerminated);46+expectType<boolean>(unicornsResultSync.isMaxBuffer);47+expectType<string | undefined>(unicornsResultSync.signal);48+expectType<string | undefined>(unicornsResultSync.signalDescription);49+expectType<string>(unicornsResultSync.cwd);50+expectType<number>(unicornsResultSync.durationMs);51+expectType<[]>(unicornsResultSync.pipedFrom);52+53+const error = new Error('.');54+if (error instanceof ExecaError) {55+ expectAssignable<ExecaError>(error);56+ expectType<'ExecaError'>(error.name);57+ expectType<string>(error.message);58+ expectType<number | undefined>(error.exitCode);59+ expectType<boolean>(error.failed);60+ expectType<boolean>(error.timedOut);61+ expectType<boolean>(error.isCanceled);62+ expectType<boolean>(error.isTerminated);63+ expectType<boolean>(error.isMaxBuffer);64+ expectType<string | undefined>(error.signal);65+ expectType<string | undefined>(error.signalDescription);66+ expectType<string>(error.cwd);67+ expectType<number>(error.durationMs);68+ expectType<string>(error.shortMessage);69+ expectType<string>(error.originalMessage);70+ expectType<string | undefined>(error.code);71+ expectType<unknown>(error.cause);72+ expectType<ExecaResult[]>(error.pipedFrom);73+}74+75+const errorSync = new Error('.');76+if (errorSync instanceof ExecaSyncError) {77+ expectAssignable<ExecaSyncError>(errorSync);78+ expectType<'ExecaSyncError'>(errorSync.name);79+ expectType<string>(errorSync.message);80+ expectType<number | undefined>(errorSync.exitCode);81+ expectType<boolean>(errorSync.failed);82+ expectType<boolean>(errorSync.timedOut);83+ expectType<boolean>(errorSync.isCanceled);84+ expectType<boolean>(errorSync.isTerminated);85+ expectType<boolean>(errorSync.isMaxBuffer);86+ expectType<string | undefined>(errorSync.signal);87+ expectType<string | undefined>(errorSync.signalDescription);88+ expectType<string>(errorSync.cwd);89+ expectType<number>(errorSync.durationMs);90+ expectType<string>(errorSync.shortMessage);91+ expectType<string>(errorSync.originalMessage);92+ expectType<string | undefined>(errorSync.code);93+ expectType<unknown>(errorSync.cause);94+ expectType<[]>(errorSync.pipedFrom);95+}added:test-d/return/result-reject.test-d.ts+32 added
1+import {expectType, expectError} from 'tsd';2+import {execa, execaSync} from '../../index.js';3+4+const rejectsResult = await execa('unicorns');5+expectError(rejectsResult.stack?.toString());6+expectError(rejectsResult.message?.toString());7+expectError(rejectsResult.shortMessage?.toString());8+expectError(rejectsResult.originalMessage?.toString());9+expectError(rejectsResult.code?.toString());10+expectError(rejectsResult.cause?.valueOf());11+12+const noRejectsResult = await execa('unicorns', {reject: false});13+expectType<string | undefined>(noRejectsResult.stack);14+expectType<string | undefined>(noRejectsResult.message);15+expectType<string | undefined>(noRejectsResult.shortMessage);16+expectType<string | undefined>(noRejectsResult.originalMessage);17+expectType<string | undefined>(noRejectsResult.code);18+expectType<unknown>(noRejectsResult.cause);19+20+const rejectsSyncResult = execaSync('unicorns');21+expectError(rejectsSyncResult.stack?.toString());22+expectError(rejectsSyncResult.message?.toString());23+expectError(rejectsSyncResult.shortMessage?.toString());24+expectError(rejectsSyncResult.originalMessage?.toString());25+expectError(rejectsSyncResult.code?.toString());26+expectError(rejectsSyncResult.cause?.valueOf());27+28+const noRejectsSyncResult = execaSync('unicorns', {reject: false});29+expectType<string | undefined>(noRejectsSyncResult.stack);30+expectType<string | undefined>(noRejectsSyncResult.message);31+expectType<string | undefined>(noRejectsSyncResult.shortMessage);32+expectType<string | undefined>(noRejectsSyncResult.originalMessage);added:test-d/return/result-stdio.test-d.ts+119 added
1+import {Readable, Writable} from 'node:stream';2+import {expectType} from 'tsd';3+import {execa, execaSync, type ExecaError, type ExecaSyncError} from '../../index.js';4+5+const unicornsResult = await execa('unicorns', {all: true});6+expectType<undefined>(unicornsResult.stdio[0]);7+expectType<string>(unicornsResult.stdout);8+expectType<string>(unicornsResult.stdio[1]);9+expectType<string>(unicornsResult.stderr);10+expectType<string>(unicornsResult.stdio[2]);11+expectType<string>(unicornsResult.all);12+expectType<string | undefined>(unicornsResult.stdio[3 as number]);13+14+const bufferResult = await execa('unicorns', {encoding: 'buffer', all: true});15+expectType<Uint8Array>(bufferResult.stdout);16+expectType<Uint8Array>(bufferResult.stdio[1]);17+expectType<Uint8Array>(bufferResult.stderr);18+expectType<Uint8Array>(bufferResult.stdio[2]);19+expectType<Uint8Array>(bufferResult.all);20+21+const hexResult = await execa('unicorns', {encoding: 'hex', all: true});22+expectType<string>(hexResult.stdout);23+expectType<string>(hexResult.stdio[1]);24+expectType<string>(hexResult.stderr);25+expectType<string>(hexResult.stdio[2]);26+expectType<string>(hexResult.all);27+28+const unicornsResultSync = execaSync('unicorns', {all: true});29+expectType<undefined>(unicornsResultSync.stdio[0]);30+expectType<string>(unicornsResultSync.stdout);31+expectType<string>(unicornsResultSync.stdio[1]);32+expectType<string>(unicornsResultSync.stderr);33+expectType<string>(unicornsResultSync.stdio[2]);34+expectType<string>(unicornsResultSync.all);35+36+const bufferResultSync = execaSync('unicorns', {encoding: 'buffer', all: true});37+expectType<undefined>(bufferResultSync.stdio[0]);38+expectType<Uint8Array>(bufferResultSync.stdout);39+expectType<Uint8Array>(bufferResultSync.stdio[1]);40+expectType<Uint8Array>(bufferResultSync.stderr);41+expectType<Uint8Array>(bufferResultSync.stdio[2]);42+expectType<Uint8Array>(bufferResultSync.all);43+44+const execaStringError = new Error('.') as ExecaError<{all: true}>;45+expectType<undefined>(execaStringError.stdio[0]);46+expectType<string>(execaStringError.stdout);47+expectType<string>(execaStringError.stdio[1]);48+expectType<string>(execaStringError.stderr);49+expectType<string>(execaStringError.stdio[2]);50+expectType<string>(execaStringError.all);51+52+const execaBufferError = new Error('.') as ExecaError<{encoding: 'buffer'; all: true}>;53+expectType<undefined>(execaBufferError.stdio[0]);54+expectType<Uint8Array>(execaBufferError.stdout);55+expectType<Uint8Array>(execaBufferError.stdio[1]);56+expectType<Uint8Array>(execaBufferError.stderr);57+expectType<Uint8Array>(execaBufferError.stdio[2]);58+expectType<Uint8Array>(execaBufferError.all);59+60+const execaStringErrorSync = new Error('.') as ExecaSyncError<{all: true}>;61+expectType<undefined>(execaStringErrorSync.stdio[0]);62+expectType<string>(execaStringErrorSync.stdout);63+expectType<string>(execaStringErrorSync.stdio[1]);64+expectType<string>(execaStringErrorSync.stderr);65+expectType<string>(execaStringErrorSync.stdio[2]);66+expectType<string>(execaStringErrorSync.all);67+68+const execaBufferErrorSync = new Error('.') as ExecaSyncError<{encoding: 'buffer'; all: true}>;69+expectType<undefined>(execaBufferErrorSync.stdio[0]);70+expectType<Uint8Array>(execaBufferErrorSync.stdout);71+expectType<Uint8Array>(execaBufferErrorSync.stdio[1]);72+expectType<Uint8Array>(execaBufferErrorSync.stderr);73+expectType<Uint8Array>(execaBufferErrorSync.stdio[2]);74+expectType<Uint8Array>(execaBufferErrorSync.all);75+76+const multipleStdoutResult = await execa('unicorns', {stdout: ['inherit', 'pipe'] as ['inherit', 'pipe'], all: true});77+expectType<string>(multipleStdoutResult.stdout);78+expectType<string>(multipleStdoutResult.stdio[1]);79+expectType<string>(multipleStdoutResult.stderr);80+expectType<string>(multipleStdoutResult.stdio[2]);81+expectType<string>(multipleStdoutResult.all);82+83+const undefinedStdoutResult = await execa('unicorns', {stdout: undefined, all: true});84+expectType<string>(undefinedStdoutResult.stdout);85+expectType<string>(undefinedStdoutResult.stderr);86+expectType<string>(undefinedStdoutResult.all);87+88+const undefinedArrayStdoutResult = await execa('unicorns', {stdout: [undefined] as const, all: true});89+expectType<string>(undefinedArrayStdoutResult.stdout);90+expectType<string>(undefinedArrayStdoutResult.stderr);91+expectType<string>(undefinedArrayStdoutResult.all);92+93+const undefinedStderrResult = await execa('unicorns', {stderr: undefined, all: true});94+expectType<string>(undefinedStderrResult.stdout);95+expectType<string>(undefinedStderrResult.stderr);96+expectType<string>(undefinedStderrResult.all);97+98+const undefinedArrayStderrResult = await execa('unicorns', {stderr: [undefined] as const, all: true});99+expectType<string>(undefinedArrayStderrResult.stdout);100+expectType<string>(undefinedArrayStderrResult.stderr);101+expectType<string>(undefinedArrayStderrResult.all);102+103+const fd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});104+expectType<string>(fd3Result.stdio[3]);105+106+const inputFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe', new Readable()]]});107+expectType<undefined>(inputFd3Result.stdio[3]);108+109+const outputFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe', new Writable()]]});110+expectType<string>(outputFd3Result.stdio[3]);111+112+const bufferFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], encoding: 'buffer'});113+expectType<Uint8Array>(bufferFd3Result.stdio[3]);114+115+const undefinedFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});116+expectType<undefined>(undefinedFd3Result.stdio[3]);117+118+const undefinedArrayFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined] as const]});119+expectType<undefined>(undefinedArrayFd3Result.stdio[3]);added:test-d/stdio/option/array-binary.test-d.ts+36 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const binaryArray = [new Uint8Array(), new Uint8Array()] as const;14+15+await execa('unicorns', {stdin: [binaryArray]});16+execaSync('unicorns', {stdin: [binaryArray]});17+18+expectError(await execa('unicorns', {stdout: [binaryArray]}));19+expectError(execaSync('unicorns', {stdout: [binaryArray]}));20+21+expectError(await execa('unicorns', {stderr: [binaryArray]}));22+expectError(execaSync('unicorns', {stderr: [binaryArray]}));23+24+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]});25+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]}));26+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]});27+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]}));28+29+expectAssignable<StdinOption>([binaryArray]);30+expectAssignable<StdinOptionSync>([binaryArray]);31+32+expectNotAssignable<StdoutStderrOption>([binaryArray]);33+expectNotAssignable<StdoutStderrOptionSync>([binaryArray]);34+35+expectAssignable<StdioOption>([binaryArray]);36+expectAssignable<StdioOptionSync>([binaryArray]);added:test-d/stdio/option/array-object.test-d.ts+36 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const objectArray = [{}, {}] as const;14+15+await execa('unicorns', {stdin: [objectArray]});16+execaSync('unicorns', {stdin: [objectArray]});17+18+expectError(await execa('unicorns', {stdout: [objectArray]}));19+expectError(execaSync('unicorns', {stdout: [objectArray]}));20+21+expectError(await execa('unicorns', {stderr: [objectArray]}));22+expectError(execaSync('unicorns', {stderr: [objectArray]}));23+24+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]});25+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]}));26+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]});27+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]}));28+29+expectAssignable<StdinOption>([objectArray]);30+expectAssignable<StdinOptionSync>([objectArray]);31+32+expectNotAssignable<StdoutStderrOption>([objectArray]);33+expectNotAssignable<StdoutStderrOptionSync>([objectArray]);34+35+expectAssignable<StdioOption>([objectArray]);36+expectAssignable<StdioOptionSync>([objectArray]);added:test-d/stdio/option/array-string.test-d.ts+36 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const stringArray = ['foo', 'bar'] as const;14+15+await execa('unicorns', {stdin: [stringArray]});16+execaSync('unicorns', {stdin: [stringArray]});17+18+expectError(await execa('unicorns', {stdout: [stringArray]}));19+expectError(execaSync('unicorns', {stdout: [stringArray]}));20+21+expectError(await execa('unicorns', {stderr: [stringArray]}));22+expectError(execaSync('unicorns', {stderr: [stringArray]}));23+24+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringArray]]});25+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringArray]]}));26+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[stringArray]]]});27+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[stringArray]]]}));28+29+expectAssignable<StdinOption>([stringArray]);30+expectAssignable<StdinOptionSync>([stringArray]);31+32+expectNotAssignable<StdoutStderrOption>([stringArray]);33+expectNotAssignable<StdoutStderrOptionSync>([stringArray]);34+35+expectAssignable<StdioOption>([stringArray]);36+expectAssignable<StdioOptionSync>([stringArray]);added:test-d/stdio/option/duplex-invalid.test-d.ts+55 added
1+import {Duplex} from 'node:stream';2+import {expectError, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+const duplexWithInvalidObjectMode = {15+ transform: new Duplex(),16+ objectMode: 'true',17+} as const;18+19+expectError(await execa('unicorns', {stdin: duplexWithInvalidObjectMode}));20+expectError(execaSync('unicorns', {stdin: duplexWithInvalidObjectMode}));21+expectError(await execa('unicorns', {stdin: [duplexWithInvalidObjectMode]}));22+expectError(execaSync('unicorns', {stdin: [duplexWithInvalidObjectMode]}));23+24+expectError(await execa('unicorns', {stdout: duplexWithInvalidObjectMode}));25+expectError(execaSync('unicorns', {stdout: duplexWithInvalidObjectMode}));26+expectError(await execa('unicorns', {stdout: [duplexWithInvalidObjectMode]}));27+expectError(execaSync('unicorns', {stdout: [duplexWithInvalidObjectMode]}));28+29+expectError(await execa('unicorns', {stderr: duplexWithInvalidObjectMode}));30+expectError(execaSync('unicorns', {stderr: duplexWithInvalidObjectMode}));31+expectError(await execa('unicorns', {stderr: [duplexWithInvalidObjectMode]}));32+expectError(execaSync('unicorns', {stderr: [duplexWithInvalidObjectMode]}));33+34+expectError(await execa('unicorns', {stdio: duplexWithInvalidObjectMode}));35+expectError(execaSync('unicorns', {stdio: duplexWithInvalidObjectMode}));36+37+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexWithInvalidObjectMode]}));38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexWithInvalidObjectMode]}));39+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexWithInvalidObjectMode]]}));40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexWithInvalidObjectMode]]}));41+42+expectNotAssignable<StdinOption>(duplexWithInvalidObjectMode);43+expectNotAssignable<StdinOptionSync>(duplexWithInvalidObjectMode);44+expectNotAssignable<StdinOption>([duplexWithInvalidObjectMode]);45+expectNotAssignable<StdinOptionSync>([duplexWithInvalidObjectMode]);46+47+expectNotAssignable<StdoutStderrOption>(duplexWithInvalidObjectMode);48+expectNotAssignable<StdoutStderrOptionSync>(duplexWithInvalidObjectMode);49+expectNotAssignable<StdoutStderrOption>([duplexWithInvalidObjectMode]);50+expectNotAssignable<StdoutStderrOptionSync>([duplexWithInvalidObjectMode]);51+52+expectNotAssignable<StdioOption>(duplexWithInvalidObjectMode);53+expectNotAssignable<StdioOptionSync>(duplexWithInvalidObjectMode);54+expectNotAssignable<StdioOption>([duplexWithInvalidObjectMode]);55+expectNotAssignable<StdioOptionSync>([duplexWithInvalidObjectMode]);added:test-d/stdio/option/duplex-object.test-d.ts+55 added
1+import {Duplex} from 'node:stream';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+const duplexObjectProperty = {15+ transform: new Duplex(),16+ objectMode: true as const,17+} as const;18+19+await execa('unicorns', {stdin: duplexObjectProperty});20+expectError(execaSync('unicorns', {stdin: duplexObjectProperty}));21+await execa('unicorns', {stdin: [duplexObjectProperty]});22+expectError(execaSync('unicorns', {stdin: [duplexObjectProperty]}));23+24+await execa('unicorns', {stdout: duplexObjectProperty});25+expectError(execaSync('unicorns', {stdout: duplexObjectProperty}));26+await execa('unicorns', {stdout: [duplexObjectProperty]});27+expectError(execaSync('unicorns', {stdout: [duplexObjectProperty]}));28+29+await execa('unicorns', {stderr: duplexObjectProperty});30+expectError(execaSync('unicorns', {stderr: duplexObjectProperty}));31+await execa('unicorns', {stderr: [duplexObjectProperty]});32+expectError(execaSync('unicorns', {stderr: [duplexObjectProperty]}));33+34+expectError(await execa('unicorns', {stdio: duplexObjectProperty}));35+expectError(execaSync('unicorns', {stdio: duplexObjectProperty}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexObjectProperty]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexObjectProperty]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexObjectProperty]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexObjectProperty]]}));41+42+expectAssignable<StdinOption>(duplexObjectProperty);43+expectNotAssignable<StdinOptionSync>(duplexObjectProperty);44+expectAssignable<StdinOption>([duplexObjectProperty]);45+expectNotAssignable<StdinOptionSync>([duplexObjectProperty]);46+47+expectAssignable<StdoutStderrOption>(duplexObjectProperty);48+expectNotAssignable<StdoutStderrOptionSync>(duplexObjectProperty);49+expectAssignable<StdoutStderrOption>([duplexObjectProperty]);50+expectNotAssignable<StdoutStderrOptionSync>([duplexObjectProperty]);51+52+expectAssignable<StdioOption>(duplexObjectProperty);53+expectNotAssignable<StdioOptionSync>(duplexObjectProperty);54+expectAssignable<StdioOption>([duplexObjectProperty]);55+expectNotAssignable<StdioOptionSync>([duplexObjectProperty]);added:test-d/stdio/option/duplex-transform.test-d.ts+52 added
1+import {Transform} from 'node:stream';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+const duplexTransform = {transform: new Transform()} as const;15+16+await execa('unicorns', {stdin: duplexTransform});17+expectError(execaSync('unicorns', {stdin: duplexTransform}));18+await execa('unicorns', {stdin: [duplexTransform]});19+expectError(execaSync('unicorns', {stdin: [duplexTransform]}));20+21+await execa('unicorns', {stdout: duplexTransform});22+expectError(execaSync('unicorns', {stdout: duplexTransform}));23+await execa('unicorns', {stdout: [duplexTransform]});24+expectError(execaSync('unicorns', {stdout: [duplexTransform]}));25+26+await execa('unicorns', {stderr: duplexTransform});27+expectError(execaSync('unicorns', {stderr: duplexTransform}));28+await execa('unicorns', {stderr: [duplexTransform]});29+expectError(execaSync('unicorns', {stderr: [duplexTransform]}));30+31+expectError(await execa('unicorns', {stdio: duplexTransform}));32+expectError(execaSync('unicorns', {stdio: duplexTransform}));33+34+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexTransform]});35+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexTransform]}));36+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexTransform]]});37+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexTransform]]}));38+39+expectAssignable<StdinOption>(duplexTransform);40+expectNotAssignable<StdinOptionSync>(duplexTransform);41+expectAssignable<StdinOption>([duplexTransform]);42+expectNotAssignable<StdinOptionSync>([duplexTransform]);43+44+expectAssignable<StdoutStderrOption>(duplexTransform);45+expectNotAssignable<StdoutStderrOptionSync>(duplexTransform);46+expectAssignable<StdoutStderrOption>([duplexTransform]);47+expectNotAssignable<StdoutStderrOptionSync>([duplexTransform]);48+49+expectAssignable<StdioOption>(duplexTransform);50+expectNotAssignable<StdioOptionSync>(duplexTransform);51+expectAssignable<StdioOption>([duplexTransform]);52+expectNotAssignable<StdioOptionSync>([duplexTransform]);added:test-d/stdio/option/duplex.test-d.ts+52 added
1+import {Duplex} from 'node:stream';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+const duplex = {transform: new Duplex()} as const;15+16+await execa('unicorns', {stdin: duplex});17+expectError(execaSync('unicorns', {stdin: duplex}));18+await execa('unicorns', {stdin: [duplex]});19+expectError(execaSync('unicorns', {stdin: [duplex]}));20+21+await execa('unicorns', {stdout: duplex});22+expectError(execaSync('unicorns', {stdout: duplex}));23+await execa('unicorns', {stdout: [duplex]});24+expectError(execaSync('unicorns', {stdout: [duplex]}));25+26+await execa('unicorns', {stderr: duplex});27+expectError(execaSync('unicorns', {stderr: duplex}));28+await execa('unicorns', {stderr: [duplex]});29+expectError(execaSync('unicorns', {stderr: [duplex]}));30+31+expectError(await execa('unicorns', {stdio: duplex}));32+expectError(execaSync('unicorns', {stdio: duplex}));33+34+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplex]});35+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplex]}));36+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplex]]});37+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplex]]}));38+39+expectAssignable<StdinOption>(duplex);40+expectNotAssignable<StdinOptionSync>(duplex);41+expectAssignable<StdinOption>([duplex]);42+expectNotAssignable<StdinOptionSync>([duplex]);43+44+expectAssignable<StdoutStderrOption>(duplex);45+expectNotAssignable<StdoutStderrOptionSync>(duplex);46+expectAssignable<StdoutStderrOption>([duplex]);47+expectNotAssignable<StdoutStderrOptionSync>([duplex]);48+49+expectAssignable<StdioOption>(duplex);50+expectNotAssignable<StdioOptionSync>(duplex);51+expectAssignable<StdioOption>([duplex]);52+expectNotAssignable<StdioOptionSync>([duplex]);added:test-d/stdio/option/fd-integer-0.test-d.ts+54 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: 0});14+execaSync('unicorns', {stdin: 0});15+await execa('unicorns', {stdin: [0]});16+execaSync('unicorns', {stdin: [0]});17+18+expectError(await execa('unicorns', {stdout: 0}));19+expectError(execaSync('unicorns', {stdout: 0}));20+expectError(await execa('unicorns', {stdout: [0]}));21+expectError(execaSync('unicorns', {stdout: [0]}));22+23+expectError(await execa('unicorns', {stderr: 0}));24+expectError(execaSync('unicorns', {stderr: 0}));25+expectError(await execa('unicorns', {stderr: [0]}));26+expectError(execaSync('unicorns', {stderr: [0]}));27+28+expectError(await execa('unicorns', {stdio: 0}));29+expectError(execaSync('unicorns', {stdio: 0}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 0]});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 0]});33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [0]]});34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [0]]});35+36+expectAssignable<StdinOption>(0);37+expectAssignable<StdinOptionSync>(0);38+expectAssignable<StdinOption>([0]);39+expectAssignable<StdinOptionSync>([0]);40+41+expectNotAssignable<StdoutStderrOption>(0);42+expectNotAssignable<StdoutStderrOptionSync>(0);43+expectNotAssignable<StdoutStderrOption>([0]);44+expectNotAssignable<StdoutStderrOptionSync>([0]);45+46+expectAssignable<StdioOption>(0);47+expectAssignable<StdioOptionSync>(0);48+expectAssignable<StdioOption>([0]);49+expectAssignable<StdioOptionSync>([0]);50+51+expectNotAssignable<StdioOption>(0.5);52+expectNotAssignable<StdioOption>(-1);53+expectNotAssignable<StdioOption>(Number.POSITIVE_INFINITY);54+expectNotAssignable<StdioOption>(Number.NaN);added:test-d/stdio/option/fd-integer-1.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+expectError(await execa('unicorns', {stdin: 1}));14+expectError(execaSync('unicorns', {stdin: 1}));15+expectError(await execa('unicorns', {stdin: [1]}));16+expectError(execaSync('unicorns', {stdin: [1]}));17+18+await execa('unicorns', {stdout: 1});19+execaSync('unicorns', {stdout: 1});20+await execa('unicorns', {stdout: [1]});21+execaSync('unicorns', {stdout: [1]});22+23+await execa('unicorns', {stderr: 1});24+execaSync('unicorns', {stderr: 1});25+await execa('unicorns', {stderr: [1]});26+execaSync('unicorns', {stderr: [1]});27+28+expectError(await execa('unicorns', {stdio: 1}));29+expectError(execaSync('unicorns', {stdio: 1}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 1]});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 1]});33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [1]]});34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [1]]});35+36+expectNotAssignable<StdinOption>(1);37+expectNotAssignable<StdinOptionSync>(1);38+expectNotAssignable<StdinOption>([1]);39+expectNotAssignable<StdinOptionSync>([1]);40+41+expectAssignable<StdoutStderrOption>(1);42+expectAssignable<StdoutStderrOptionSync>(1);43+expectAssignable<StdoutStderrOption>([1]);44+expectAssignable<StdoutStderrOptionSync>([1]);45+46+expectAssignable<StdioOption>(1);47+expectAssignable<StdioOptionSync>(1);48+expectAssignable<StdioOption>([1]);49+expectAssignable<StdioOptionSync>([1]);added:test-d/stdio/option/fd-integer-2.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+expectError(await execa('unicorns', {stdin: 2}));14+expectError(execaSync('unicorns', {stdin: 2}));15+expectError(await execa('unicorns', {stdin: [2]}));16+expectError(execaSync('unicorns', {stdin: [2]}));17+18+await execa('unicorns', {stdout: 2});19+execaSync('unicorns', {stdout: 2});20+await execa('unicorns', {stdout: [2]});21+execaSync('unicorns', {stdout: [2]});22+23+await execa('unicorns', {stderr: 2});24+execaSync('unicorns', {stderr: 2});25+await execa('unicorns', {stderr: [2]});26+execaSync('unicorns', {stderr: [2]});27+28+expectError(await execa('unicorns', {stdio: 2}));29+expectError(execaSync('unicorns', {stdio: 2}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 2]});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 2]});33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [2]]});34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [2]]});35+36+expectNotAssignable<StdinOption>(2);37+expectNotAssignable<StdinOptionSync>(2);38+expectNotAssignable<StdinOption>([2]);39+expectNotAssignable<StdinOptionSync>([2]);40+41+expectAssignable<StdoutStderrOption>(2);42+expectAssignable<StdoutStderrOptionSync>(2);43+expectAssignable<StdoutStderrOption>([2]);44+expectAssignable<StdoutStderrOptionSync>([2]);45+46+expectAssignable<StdioOption>(2);47+expectAssignable<StdioOptionSync>(2);48+expectAssignable<StdioOption>([2]);49+expectAssignable<StdioOptionSync>([2]);added:test-d/stdio/option/fd-integer-3.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: 3});14+execaSync('unicorns', {stdin: 3});15+expectError(await execa('unicorns', {stdin: [3]}));16+execaSync('unicorns', {stdin: [3]});17+18+await execa('unicorns', {stdout: 3});19+execaSync('unicorns', {stdout: 3});20+expectError(await execa('unicorns', {stdout: [3]}));21+execaSync('unicorns', {stdout: [3]});22+23+await execa('unicorns', {stderr: 3});24+execaSync('unicorns', {stderr: 3});25+expectError(await execa('unicorns', {stderr: [3]}));26+execaSync('unicorns', {stderr: [3]});27+28+expectError(await execa('unicorns', {stdio: 3}));29+expectError(execaSync('unicorns', {stdio: 3}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 3]});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 3]});33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [3]]}));34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [3]]});35+36+expectAssignable<StdinOption>(3);37+expectAssignable<StdinOptionSync>(3);38+expectNotAssignable<StdinOption>([3]);39+expectAssignable<StdinOptionSync>([3]);40+41+expectAssignable<StdoutStderrOption>(3);42+expectAssignable<StdoutStderrOptionSync>(3);43+expectNotAssignable<StdoutStderrOption>([3]);44+expectAssignable<StdoutStderrOptionSync>([3]);45+46+expectAssignable<StdioOption>(3);47+expectAssignable<StdioOptionSync>(3);48+expectNotAssignable<StdioOption>([3]);49+expectAssignable<StdioOptionSync>([3]);added:test-d/stdio/option/file-object-invalid.test-d.ts+51 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const invalidFileObject = {file: new URL('file:///test')} as const;14+15+expectError(await execa('unicorns', {stdin: invalidFileObject}));16+expectError(execaSync('unicorns', {stdin: invalidFileObject}));17+expectError(await execa('unicorns', {stdin: [invalidFileObject]}));18+expectError(execaSync('unicorns', {stdin: [invalidFileObject]}));19+20+expectError(await execa('unicorns', {stdout: invalidFileObject}));21+expectError(execaSync('unicorns', {stdout: invalidFileObject}));22+expectError(await execa('unicorns', {stdout: [invalidFileObject]}));23+expectError(execaSync('unicorns', {stdout: [invalidFileObject]}));24+25+expectError(await execa('unicorns', {stderr: invalidFileObject}));26+expectError(execaSync('unicorns', {stderr: invalidFileObject}));27+expectError(await execa('unicorns', {stderr: [invalidFileObject]}));28+expectError(execaSync('unicorns', {stderr: [invalidFileObject]}));29+30+expectError(await execa('unicorns', {stdio: invalidFileObject}));31+expectError(execaSync('unicorns', {stdio: invalidFileObject}));32+33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidFileObject]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidFileObject]}));35+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidFileObject]]}));36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidFileObject]]}));37+38+expectNotAssignable<StdinOption>(invalidFileObject);39+expectNotAssignable<StdinOptionSync>(invalidFileObject);40+expectNotAssignable<StdinOption>([invalidFileObject]);41+expectNotAssignable<StdinOptionSync>([invalidFileObject]);42+43+expectNotAssignable<StdoutStderrOption>(invalidFileObject);44+expectNotAssignable<StdoutStderrOptionSync>(invalidFileObject);45+expectNotAssignable<StdoutStderrOption>([invalidFileObject]);46+expectNotAssignable<StdoutStderrOptionSync>([invalidFileObject]);47+48+expectNotAssignable<StdioOption>(invalidFileObject);49+expectNotAssignable<StdioOptionSync>(invalidFileObject);50+expectNotAssignable<StdioOption>([invalidFileObject]);51+expectNotAssignable<StdioOptionSync>([invalidFileObject]);added:test-d/stdio/option/file-object.test-d.ts+51 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const fileObject = {file: './test'} as const;14+15+await execa('unicorns', {stdin: fileObject});16+execaSync('unicorns', {stdin: fileObject});17+await execa('unicorns', {stdin: [fileObject]});18+execaSync('unicorns', {stdin: [fileObject]});19+20+await execa('unicorns', {stdout: fileObject});21+execaSync('unicorns', {stdout: fileObject});22+await execa('unicorns', {stdout: [fileObject]});23+execaSync('unicorns', {stdout: [fileObject]});24+25+await execa('unicorns', {stderr: fileObject});26+execaSync('unicorns', {stderr: fileObject});27+await execa('unicorns', {stderr: [fileObject]});28+execaSync('unicorns', {stderr: [fileObject]});29+30+expectError(await execa('unicorns', {stdio: fileObject}));31+expectError(execaSync('unicorns', {stdio: fileObject}));32+33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileObject]});34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileObject]});35+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileObject]]});36+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileObject]]});37+38+expectAssignable<StdinOption>(fileObject);39+expectAssignable<StdinOptionSync>(fileObject);40+expectAssignable<StdinOption>([fileObject]);41+expectAssignable<StdinOptionSync>([fileObject]);42+43+expectAssignable<StdoutStderrOption>(fileObject);44+expectAssignable<StdoutStderrOptionSync>(fileObject);45+expectAssignable<StdoutStderrOption>([fileObject]);46+expectAssignable<StdoutStderrOptionSync>([fileObject]);47+48+expectAssignable<StdioOption>(fileObject);49+expectAssignable<StdioOptionSync>(fileObject);50+expectAssignable<StdioOption>([fileObject]);51+expectAssignable<StdioOptionSync>([fileObject]);added:test-d/stdio/option/file-url.test-d.ts+51 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const fileUrl = new URL('file:///test');14+15+await execa('unicorns', {stdin: fileUrl});16+execaSync('unicorns', {stdin: fileUrl});17+await execa('unicorns', {stdin: [fileUrl]});18+execaSync('unicorns', {stdin: [fileUrl]});19+20+await execa('unicorns', {stdout: fileUrl});21+execaSync('unicorns', {stdout: fileUrl});22+await execa('unicorns', {stdout: [fileUrl]});23+execaSync('unicorns', {stdout: [fileUrl]});24+25+await execa('unicorns', {stderr: fileUrl});26+execaSync('unicorns', {stderr: fileUrl});27+await execa('unicorns', {stderr: [fileUrl]});28+execaSync('unicorns', {stderr: [fileUrl]});29+30+expectError(await execa('unicorns', {stdio: fileUrl}));31+expectError(execaSync('unicorns', {stdio: fileUrl}));32+33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileUrl]});34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileUrl]});35+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileUrl]]});36+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileUrl]]});37+38+expectAssignable<StdinOption>(fileUrl);39+expectAssignable<StdinOptionSync>(fileUrl);40+expectAssignable<StdinOption>([fileUrl]);41+expectAssignable<StdinOptionSync>([fileUrl]);42+43+expectAssignable<StdoutStderrOption>(fileUrl);44+expectAssignable<StdoutStderrOptionSync>(fileUrl);45+expectAssignable<StdoutStderrOption>([fileUrl]);46+expectAssignable<StdoutStderrOptionSync>([fileUrl]);47+48+expectAssignable<StdioOption>(fileUrl);49+expectAssignable<StdioOptionSync>(fileUrl);50+expectAssignable<StdioOption>([fileUrl]);51+expectAssignable<StdioOptionSync>([fileUrl]);added:test-d/stdio/option/final-async-full.test-d.ts+58 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const asyncFinalFull = {14+ async * transform(line: unknown) {15+ yield '';16+ },17+ async * final() {18+ yield '';19+ },20+} as const;21+22+await execa('unicorns', {stdin: asyncFinalFull});23+expectError(execaSync('unicorns', {stdin: asyncFinalFull}));24+await execa('unicorns', {stdin: [asyncFinalFull]});25+expectError(execaSync('unicorns', {stdin: [asyncFinalFull]}));26+27+await execa('unicorns', {stdout: asyncFinalFull});28+expectError(execaSync('unicorns', {stdout: asyncFinalFull}));29+await execa('unicorns', {stdout: [asyncFinalFull]});30+expectError(execaSync('unicorns', {stdout: [asyncFinalFull]}));31+32+await execa('unicorns', {stderr: asyncFinalFull});33+expectError(execaSync('unicorns', {stderr: asyncFinalFull}));34+await execa('unicorns', {stderr: [asyncFinalFull]});35+expectError(execaSync('unicorns', {stderr: [asyncFinalFull]}));36+37+expectError(await execa('unicorns', {stdio: asyncFinalFull}));38+expectError(execaSync('unicorns', {stdio: asyncFinalFull}));39+40+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncFinalFull]});41+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncFinalFull]}));42+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncFinalFull]]});43+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncFinalFull]]}));44+45+expectAssignable<StdinOption>(asyncFinalFull);46+expectNotAssignable<StdinOptionSync>(asyncFinalFull);47+expectAssignable<StdinOption>([asyncFinalFull]);48+expectNotAssignable<StdinOptionSync>([asyncFinalFull]);49+50+expectAssignable<StdoutStderrOption>(asyncFinalFull);51+expectNotAssignable<StdoutStderrOptionSync>(asyncFinalFull);52+expectAssignable<StdoutStderrOption>([asyncFinalFull]);53+expectNotAssignable<StdoutStderrOptionSync>([asyncFinalFull]);54+55+expectAssignable<StdioOption>(asyncFinalFull);56+expectNotAssignable<StdioOptionSync>(asyncFinalFull);57+expectAssignable<StdioOption>([asyncFinalFull]);58+expectNotAssignable<StdioOptionSync>([asyncFinalFull]);added:test-d/stdio/option/final-invalid-full.test-d.ts+59 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const invalidReturnFinalFull = {14+ * transform(line: string) {15+ yield line;16+ },17+ * final() {18+ yield {} as unknown;19+ return false;20+ },21+} as const;22+23+expectError(await execa('unicorns', {stdin: invalidReturnFinalFull}));24+expectError(execaSync('unicorns', {stdin: invalidReturnFinalFull}));25+expectError(await execa('unicorns', {stdin: [invalidReturnFinalFull]}));26+expectError(execaSync('unicorns', {stdin: [invalidReturnFinalFull]}));27+28+expectError(await execa('unicorns', {stdout: invalidReturnFinalFull}));29+expectError(execaSync('unicorns', {stdout: invalidReturnFinalFull}));30+expectError(await execa('unicorns', {stdout: [invalidReturnFinalFull]}));31+expectError(execaSync('unicorns', {stdout: [invalidReturnFinalFull]}));32+33+expectError(await execa('unicorns', {stderr: invalidReturnFinalFull}));34+expectError(execaSync('unicorns', {stderr: invalidReturnFinalFull}));35+expectError(await execa('unicorns', {stderr: [invalidReturnFinalFull]}));36+expectError(execaSync('unicorns', {stderr: [invalidReturnFinalFull]}));37+38+expectError(await execa('unicorns', {stdio: invalidReturnFinalFull}));39+expectError(execaSync('unicorns', {stdio: invalidReturnFinalFull}));40+41+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnFinalFull]}));42+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnFinalFull]}));43+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnFinalFull]]}));44+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnFinalFull]]}));45+46+expectNotAssignable<StdinOption>(invalidReturnFinalFull);47+expectNotAssignable<StdinOptionSync>(invalidReturnFinalFull);48+expectNotAssignable<StdinOption>([invalidReturnFinalFull]);49+expectNotAssignable<StdinOptionSync>([invalidReturnFinalFull]);50+51+expectNotAssignable<StdoutStderrOption>(invalidReturnFinalFull);52+expectNotAssignable<StdoutStderrOptionSync>(invalidReturnFinalFull);53+expectNotAssignable<StdoutStderrOption>([invalidReturnFinalFull]);54+expectNotAssignable<StdoutStderrOptionSync>([invalidReturnFinalFull]);55+56+expectNotAssignable<StdioOption>(invalidReturnFinalFull);57+expectNotAssignable<StdioOptionSync>(invalidReturnFinalFull);58+expectNotAssignable<StdioOption>([invalidReturnFinalFull]);59+expectNotAssignable<StdioOptionSync>([invalidReturnFinalFull]);added:test-d/stdio/option/final-object-full.test-d.ts+59 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const objectFinalFull = {14+ * transform(line: unknown) {15+ yield JSON.parse(line as string) as object;16+ },17+ * final() {18+ yield {};19+ },20+ objectMode: true,21+} as const;22+23+await execa('unicorns', {stdin: objectFinalFull});24+execaSync('unicorns', {stdin: objectFinalFull});25+await execa('unicorns', {stdin: [objectFinalFull]});26+execaSync('unicorns', {stdin: [objectFinalFull]});27+28+await execa('unicorns', {stdout: objectFinalFull});29+execaSync('unicorns', {stdout: objectFinalFull});30+await execa('unicorns', {stdout: [objectFinalFull]});31+execaSync('unicorns', {stdout: [objectFinalFull]});32+33+await execa('unicorns', {stderr: objectFinalFull});34+execaSync('unicorns', {stderr: objectFinalFull});35+await execa('unicorns', {stderr: [objectFinalFull]});36+execaSync('unicorns', {stderr: [objectFinalFull]});37+38+expectError(await execa('unicorns', {stdio: objectFinalFull}));39+expectError(execaSync('unicorns', {stdio: objectFinalFull}));40+41+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectFinalFull]});42+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectFinalFull]});43+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectFinalFull]]});44+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectFinalFull]]});45+46+expectAssignable<StdinOption>(objectFinalFull);47+expectAssignable<StdinOptionSync>(objectFinalFull);48+expectAssignable<StdinOption>([objectFinalFull]);49+expectAssignable<StdinOptionSync>([objectFinalFull]);50+51+expectAssignable<StdoutStderrOption>(objectFinalFull);52+expectAssignable<StdoutStderrOptionSync>(objectFinalFull);53+expectAssignable<StdoutStderrOption>([objectFinalFull]);54+expectAssignable<StdoutStderrOptionSync>([objectFinalFull]);55+56+expectAssignable<StdioOption>(objectFinalFull);57+expectAssignable<StdioOptionSync>(objectFinalFull);58+expectAssignable<StdioOption>([objectFinalFull]);59+expectAssignable<StdioOptionSync>([objectFinalFull]);added:test-d/stdio/option/final-unknown-full.test-d.ts+59 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const unknownFinalFull = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ * final() {18+ yield {} as unknown;19+ },20+ objectMode: true,21+} as const;22+23+await execa('unicorns', {stdin: unknownFinalFull});24+execaSync('unicorns', {stdin: unknownFinalFull});25+await execa('unicorns', {stdin: [unknownFinalFull]});26+execaSync('unicorns', {stdin: [unknownFinalFull]});27+28+await execa('unicorns', {stdout: unknownFinalFull});29+execaSync('unicorns', {stdout: unknownFinalFull});30+await execa('unicorns', {stdout: [unknownFinalFull]});31+execaSync('unicorns', {stdout: [unknownFinalFull]});32+33+await execa('unicorns', {stderr: unknownFinalFull});34+execaSync('unicorns', {stderr: unknownFinalFull});35+await execa('unicorns', {stderr: [unknownFinalFull]});36+execaSync('unicorns', {stderr: [unknownFinalFull]});37+38+expectError(await execa('unicorns', {stdio: unknownFinalFull}));39+expectError(execaSync('unicorns', {stdio: unknownFinalFull}));40+41+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownFinalFull]});42+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownFinalFull]});43+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownFinalFull]]});44+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownFinalFull]]});45+46+expectAssignable<StdinOption>(unknownFinalFull);47+expectAssignable<StdinOptionSync>(unknownFinalFull);48+expectAssignable<StdinOption>([unknownFinalFull]);49+expectAssignable<StdinOptionSync>([unknownFinalFull]);50+51+expectAssignable<StdoutStderrOption>(unknownFinalFull);52+expectAssignable<StdoutStderrOptionSync>(unknownFinalFull);53+expectAssignable<StdoutStderrOption>([unknownFinalFull]);54+expectAssignable<StdoutStderrOptionSync>([unknownFinalFull]);55+56+expectAssignable<StdioOption>(unknownFinalFull);57+expectAssignable<StdioOptionSync>(unknownFinalFull);58+expectAssignable<StdioOption>([unknownFinalFull]);59+expectAssignable<StdioOptionSync>([unknownFinalFull]);added:test-d/stdio/option/generator-async-full.test-d.ts+55 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const asyncGeneratorFull = {14+ async * transform(line: unknown) {15+ yield '';16+ },17+} as const;18+19+await execa('unicorns', {stdin: asyncGeneratorFull});20+expectError(execaSync('unicorns', {stdin: asyncGeneratorFull}));21+await execa('unicorns', {stdin: [asyncGeneratorFull]});22+expectError(execaSync('unicorns', {stdin: [asyncGeneratorFull]}));23+24+await execa('unicorns', {stdout: asyncGeneratorFull});25+expectError(execaSync('unicorns', {stdout: asyncGeneratorFull}));26+await execa('unicorns', {stdout: [asyncGeneratorFull]});27+expectError(execaSync('unicorns', {stdout: [asyncGeneratorFull]}));28+29+await execa('unicorns', {stderr: asyncGeneratorFull});30+expectError(execaSync('unicorns', {stderr: asyncGeneratorFull}));31+await execa('unicorns', {stderr: [asyncGeneratorFull]});32+expectError(execaSync('unicorns', {stderr: [asyncGeneratorFull]}));33+34+expectError(await execa('unicorns', {stdio: asyncGeneratorFull}));35+expectError(execaSync('unicorns', {stdio: asyncGeneratorFull}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGeneratorFull]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGeneratorFull]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGeneratorFull]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGeneratorFull]]}));41+42+expectAssignable<StdinOption>(asyncGeneratorFull);43+expectNotAssignable<StdinOptionSync>(asyncGeneratorFull);44+expectAssignable<StdinOption>([asyncGeneratorFull]);45+expectNotAssignable<StdinOptionSync>([asyncGeneratorFull]);46+47+expectAssignable<StdoutStderrOption>(asyncGeneratorFull);48+expectNotAssignable<StdoutStderrOptionSync>(asyncGeneratorFull);49+expectAssignable<StdoutStderrOption>([asyncGeneratorFull]);50+expectNotAssignable<StdoutStderrOptionSync>([asyncGeneratorFull]);51+52+expectAssignable<StdioOption>(asyncGeneratorFull);53+expectNotAssignable<StdioOptionSync>(asyncGeneratorFull);54+expectAssignable<StdioOption>([asyncGeneratorFull]);55+expectNotAssignable<StdioOptionSync>([asyncGeneratorFull]);added:test-d/stdio/option/generator-async.test-d.ts+53 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const asyncGenerator = async function * (line: unknown) {14+ yield '';15+};16+17+await execa('unicorns', {stdin: asyncGenerator});18+expectError(execaSync('unicorns', {stdin: asyncGenerator}));19+await execa('unicorns', {stdin: [asyncGenerator]});20+expectError(execaSync('unicorns', {stdin: [asyncGenerator]}));21+22+await execa('unicorns', {stdout: asyncGenerator});23+expectError(execaSync('unicorns', {stdout: asyncGenerator}));24+await execa('unicorns', {stdout: [asyncGenerator]});25+expectError(execaSync('unicorns', {stdout: [asyncGenerator]}));26+27+await execa('unicorns', {stderr: asyncGenerator});28+expectError(execaSync('unicorns', {stderr: asyncGenerator}));29+await execa('unicorns', {stderr: [asyncGenerator]});30+expectError(execaSync('unicorns', {stderr: [asyncGenerator]}));31+32+expectError(await execa('unicorns', {stdio: asyncGenerator}));33+expectError(execaSync('unicorns', {stdio: asyncGenerator}));34+35+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGenerator]});36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGenerator]}));37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGenerator]]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGenerator]]}));39+40+expectAssignable<StdinOption>(asyncGenerator);41+expectNotAssignable<StdinOptionSync>(asyncGenerator);42+expectAssignable<StdinOption>([asyncGenerator]);43+expectNotAssignable<StdinOptionSync>([asyncGenerator]);44+45+expectAssignable<StdoutStderrOption>(asyncGenerator);46+expectNotAssignable<StdoutStderrOptionSync>(asyncGenerator);47+expectAssignable<StdoutStderrOption>([asyncGenerator]);48+expectNotAssignable<StdoutStderrOptionSync>([asyncGenerator]);49+50+expectAssignable<StdioOption>(asyncGenerator);51+expectNotAssignable<StdioOptionSync>(asyncGenerator);52+expectAssignable<StdioOption>([asyncGenerator]);53+expectNotAssignable<StdioOptionSync>([asyncGenerator]);added:test-d/stdio/option/generator-binary-invalid.test-d.ts+56 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const transformWithInvalidBinary = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ binary: 'true',18+} as const;19+20+expectError(await execa('unicorns', {stdin: transformWithInvalidBinary}));21+expectError(execaSync('unicorns', {stdin: transformWithInvalidBinary}));22+expectError(await execa('unicorns', {stdin: [transformWithInvalidBinary]}));23+expectError(execaSync('unicorns', {stdin: [transformWithInvalidBinary]}));24+25+expectError(await execa('unicorns', {stdout: transformWithInvalidBinary}));26+expectError(execaSync('unicorns', {stdout: transformWithInvalidBinary}));27+expectError(await execa('unicorns', {stdout: [transformWithInvalidBinary]}));28+expectError(execaSync('unicorns', {stdout: [transformWithInvalidBinary]}));29+30+expectError(await execa('unicorns', {stderr: transformWithInvalidBinary}));31+expectError(execaSync('unicorns', {stderr: transformWithInvalidBinary}));32+expectError(await execa('unicorns', {stderr: [transformWithInvalidBinary]}));33+expectError(execaSync('unicorns', {stderr: [transformWithInvalidBinary]}));34+35+expectError(await execa('unicorns', {stdio: transformWithInvalidBinary}));36+expectError(execaSync('unicorns', {stdio: transformWithInvalidBinary}));37+38+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidBinary]}));39+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidBinary]}));40+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidBinary]]}));41+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidBinary]]}));42+43+expectNotAssignable<StdinOption>(transformWithInvalidBinary);44+expectNotAssignable<StdinOptionSync>(transformWithInvalidBinary);45+expectNotAssignable<StdinOption>([transformWithInvalidBinary]);46+expectNotAssignable<StdinOptionSync>([transformWithInvalidBinary]);47+48+expectNotAssignable<StdoutStderrOption>(transformWithInvalidBinary);49+expectNotAssignable<StdoutStderrOptionSync>(transformWithInvalidBinary);50+expectNotAssignable<StdoutStderrOption>([transformWithInvalidBinary]);51+expectNotAssignable<StdoutStderrOptionSync>([transformWithInvalidBinary]);52+53+expectNotAssignable<StdioOption>(transformWithInvalidBinary);54+expectNotAssignable<StdioOptionSync>(transformWithInvalidBinary);55+expectNotAssignable<StdioOption>([transformWithInvalidBinary]);56+expectNotAssignable<StdioOptionSync>([transformWithInvalidBinary]);added:test-d/stdio/option/generator-binary.test-d.ts+56 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const transformWithBinary = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ binary: true,18+} as const;19+20+await execa('unicorns', {stdin: transformWithBinary});21+execaSync('unicorns', {stdin: transformWithBinary});22+await execa('unicorns', {stdin: [transformWithBinary]});23+execaSync('unicorns', {stdin: [transformWithBinary]});24+25+await execa('unicorns', {stdout: transformWithBinary});26+execaSync('unicorns', {stdout: transformWithBinary});27+await execa('unicorns', {stdout: [transformWithBinary]});28+execaSync('unicorns', {stdout: [transformWithBinary]});29+30+await execa('unicorns', {stderr: transformWithBinary});31+execaSync('unicorns', {stderr: transformWithBinary});32+await execa('unicorns', {stderr: [transformWithBinary]});33+execaSync('unicorns', {stderr: [transformWithBinary]});34+35+expectError(await execa('unicorns', {stdio: transformWithBinary}));36+expectError(execaSync('unicorns', {stdio: transformWithBinary}));37+38+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithBinary]});39+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithBinary]});40+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithBinary]]});41+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithBinary]]});42+43+expectAssignable<StdinOption>(transformWithBinary);44+expectAssignable<StdinOptionSync>(transformWithBinary);45+expectAssignable<StdinOption>([transformWithBinary]);46+expectAssignable<StdinOptionSync>([transformWithBinary]);47+48+expectAssignable<StdoutStderrOption>(transformWithBinary);49+expectAssignable<StdoutStderrOptionSync>(transformWithBinary);50+expectAssignable<StdoutStderrOption>([transformWithBinary]);51+expectAssignable<StdoutStderrOptionSync>([transformWithBinary]);52+53+expectAssignable<StdioOption>(transformWithBinary);54+expectAssignable<StdioOptionSync>(transformWithBinary);55+expectAssignable<StdioOption>([transformWithBinary]);56+expectAssignable<StdioOptionSync>([transformWithBinary]);added:test-d/stdio/option/generator-boolean-full.test-d.ts+55 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const booleanGeneratorFull = {14+ * transform(line: boolean) {15+ yield line;16+ },17+} as const;18+19+expectError(await execa('unicorns', {stdin: booleanGeneratorFull}));20+expectError(execaSync('unicorns', {stdin: booleanGeneratorFull}));21+expectError(await execa('unicorns', {stdin: [booleanGeneratorFull]}));22+expectError(execaSync('unicorns', {stdin: [booleanGeneratorFull]}));23+24+expectError(await execa('unicorns', {stdout: booleanGeneratorFull}));25+expectError(execaSync('unicorns', {stdout: booleanGeneratorFull}));26+expectError(await execa('unicorns', {stdout: [booleanGeneratorFull]}));27+expectError(execaSync('unicorns', {stdout: [booleanGeneratorFull]}));28+29+expectError(await execa('unicorns', {stderr: booleanGeneratorFull}));30+expectError(execaSync('unicorns', {stderr: booleanGeneratorFull}));31+expectError(await execa('unicorns', {stderr: [booleanGeneratorFull]}));32+expectError(execaSync('unicorns', {stderr: [booleanGeneratorFull]}));33+34+expectError(await execa('unicorns', {stdio: booleanGeneratorFull}));35+expectError(execaSync('unicorns', {stdio: booleanGeneratorFull}));36+37+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGeneratorFull]}));38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGeneratorFull]}));39+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGeneratorFull]]}));40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGeneratorFull]]}));41+42+expectNotAssignable<StdinOption>(booleanGeneratorFull);43+expectNotAssignable<StdinOptionSync>(booleanGeneratorFull);44+expectNotAssignable<StdinOption>([booleanGeneratorFull]);45+expectNotAssignable<StdinOptionSync>([booleanGeneratorFull]);46+47+expectNotAssignable<StdoutStderrOption>(booleanGeneratorFull);48+expectNotAssignable<StdoutStderrOptionSync>(booleanGeneratorFull);49+expectNotAssignable<StdoutStderrOption>([booleanGeneratorFull]);50+expectNotAssignable<StdoutStderrOptionSync>([booleanGeneratorFull]);51+52+expectNotAssignable<StdioOption>(booleanGeneratorFull);53+expectNotAssignable<StdioOptionSync>(booleanGeneratorFull);54+expectNotAssignable<StdioOption>([booleanGeneratorFull]);55+expectNotAssignable<StdioOptionSync>([booleanGeneratorFull]);added:test-d/stdio/option/generator-boolean.test-d.ts+53 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const booleanGenerator = function * (line: boolean) {14+ yield line;15+};16+17+expectError(await execa('unicorns', {stdin: booleanGenerator}));18+expectError(execaSync('unicorns', {stdin: booleanGenerator}));19+expectError(await execa('unicorns', {stdin: [booleanGenerator]}));20+expectError(execaSync('unicorns', {stdin: [booleanGenerator]}));21+22+expectError(await execa('unicorns', {stdout: booleanGenerator}));23+expectError(execaSync('unicorns', {stdout: booleanGenerator}));24+expectError(await execa('unicorns', {stdout: [booleanGenerator]}));25+expectError(execaSync('unicorns', {stdout: [booleanGenerator]}));26+27+expectError(await execa('unicorns', {stderr: booleanGenerator}));28+expectError(execaSync('unicorns', {stderr: booleanGenerator}));29+expectError(await execa('unicorns', {stderr: [booleanGenerator]}));30+expectError(execaSync('unicorns', {stderr: [booleanGenerator]}));31+32+expectError(await execa('unicorns', {stdio: booleanGenerator}));33+expectError(execaSync('unicorns', {stdio: booleanGenerator}));34+35+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGenerator]}));36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGenerator]}));37+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGenerator]]}));38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGenerator]]}));39+40+expectNotAssignable<StdinOption>(booleanGenerator);41+expectNotAssignable<StdinOptionSync>(booleanGenerator);42+expectNotAssignable<StdinOption>([booleanGenerator]);43+expectNotAssignable<StdinOptionSync>([booleanGenerator]);44+45+expectNotAssignable<StdoutStderrOption>(booleanGenerator);46+expectNotAssignable<StdoutStderrOptionSync>(booleanGenerator);47+expectNotAssignable<StdoutStderrOption>([booleanGenerator]);48+expectNotAssignable<StdoutStderrOptionSync>([booleanGenerator]);49+50+expectNotAssignable<StdioOption>(booleanGenerator);51+expectNotAssignable<StdioOptionSync>(booleanGenerator);52+expectNotAssignable<StdioOption>([booleanGenerator]);53+expectNotAssignable<StdioOptionSync>([booleanGenerator]);added:test-d/stdio/option/generator-empty.test-d.ts+49 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+expectError(await execa('unicorns', {stdin: {}}));14+expectError(execaSync('unicorns', {stdin: {}}));15+expectError(await execa('unicorns', {stdin: [{}]}));16+expectError(execaSync('unicorns', {stdin: [{}]}));17+18+expectError(await execa('unicorns', {stdout: {}}));19+expectError(execaSync('unicorns', {stdout: {}}));20+expectError(await execa('unicorns', {stdout: [{}]}));21+expectError(execaSync('unicorns', {stdout: [{}]}));22+23+expectError(await execa('unicorns', {stderr: {}}));24+expectError(execaSync('unicorns', {stderr: {}}));25+expectError(await execa('unicorns', {stderr: [{}]}));26+expectError(execaSync('unicorns', {stderr: [{}]}));27+28+expectError(await execa('unicorns', {stdio: {}}));29+expectError(execaSync('unicorns', {stdio: {}}));30+31+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {}]}));32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {}]}));33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [{}]]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [{}]]}));35+36+expectNotAssignable<StdinOption>({});37+expectNotAssignable<StdinOptionSync>({});38+expectNotAssignable<StdinOption>([{}]);39+expectNotAssignable<StdinOptionSync>([{}]);40+41+expectNotAssignable<StdoutStderrOption>({});42+expectNotAssignable<StdoutStderrOptionSync>({});43+expectNotAssignable<StdoutStderrOption>([{}]);44+expectNotAssignable<StdoutStderrOptionSync>([{}]);45+46+expectNotAssignable<StdioOption>({});47+expectNotAssignable<StdioOptionSync>({});48+expectNotAssignable<StdioOption>([{}]);49+expectNotAssignable<StdioOptionSync>([{}]);added:test-d/stdio/option/generator-invalid-full.test-d.ts+56 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const invalidReturnGeneratorFull = {14+ * transform(line: unknown) {15+ yield line;16+ return false;17+ },18+} as const;19+20+expectError(await execa('unicorns', {stdin: invalidReturnGeneratorFull}));21+expectError(execaSync('unicorns', {stdin: invalidReturnGeneratorFull}));22+expectError(await execa('unicorns', {stdin: [invalidReturnGeneratorFull]}));23+expectError(execaSync('unicorns', {stdin: [invalidReturnGeneratorFull]}));24+25+expectError(await execa('unicorns', {stdout: invalidReturnGeneratorFull}));26+expectError(execaSync('unicorns', {stdout: invalidReturnGeneratorFull}));27+expectError(await execa('unicorns', {stdout: [invalidReturnGeneratorFull]}));28+expectError(execaSync('unicorns', {stdout: [invalidReturnGeneratorFull]}));29+30+expectError(await execa('unicorns', {stderr: invalidReturnGeneratorFull}));31+expectError(execaSync('unicorns', {stderr: invalidReturnGeneratorFull}));32+expectError(await execa('unicorns', {stderr: [invalidReturnGeneratorFull]}));33+expectError(execaSync('unicorns', {stderr: [invalidReturnGeneratorFull]}));34+35+expectError(await execa('unicorns', {stdio: invalidReturnGeneratorFull}));36+expectError(execaSync('unicorns', {stdio: invalidReturnGeneratorFull}));37+38+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGeneratorFull]}));39+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGeneratorFull]}));40+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGeneratorFull]]}));41+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGeneratorFull]]}));42+43+expectNotAssignable<StdinOption>(invalidReturnGeneratorFull);44+expectNotAssignable<StdinOptionSync>(invalidReturnGeneratorFull);45+expectNotAssignable<StdinOption>([invalidReturnGeneratorFull]);46+expectNotAssignable<StdinOptionSync>([invalidReturnGeneratorFull]);47+48+expectNotAssignable<StdoutStderrOption>(invalidReturnGeneratorFull);49+expectNotAssignable<StdoutStderrOptionSync>(invalidReturnGeneratorFull);50+expectNotAssignable<StdoutStderrOption>([invalidReturnGeneratorFull]);51+expectNotAssignable<StdoutStderrOptionSync>([invalidReturnGeneratorFull]);52+53+expectNotAssignable<StdioOption>(invalidReturnGeneratorFull);54+expectNotAssignable<StdioOptionSync>(invalidReturnGeneratorFull);55+expectNotAssignable<StdioOption>([invalidReturnGeneratorFull]);56+expectNotAssignable<StdioOptionSync>([invalidReturnGeneratorFull]);added:test-d/stdio/option/generator-invalid.test-d.ts+54 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const invalidReturnGenerator = function * (line: unknown) {14+ yield line;15+ return false;16+};17+18+expectError(await execa('unicorns', {stdin: invalidReturnGenerator}));19+expectError(execaSync('unicorns', {stdin: invalidReturnGenerator}));20+expectError(await execa('unicorns', {stdin: [invalidReturnGenerator]}));21+expectError(execaSync('unicorns', {stdin: [invalidReturnGenerator]}));22+23+expectError(await execa('unicorns', {stdout: invalidReturnGenerator}));24+expectError(execaSync('unicorns', {stdout: invalidReturnGenerator}));25+expectError(await execa('unicorns', {stdout: [invalidReturnGenerator]}));26+expectError(execaSync('unicorns', {stdout: [invalidReturnGenerator]}));27+28+expectError(await execa('unicorns', {stderr: invalidReturnGenerator}));29+expectError(execaSync('unicorns', {stderr: invalidReturnGenerator}));30+expectError(await execa('unicorns', {stderr: [invalidReturnGenerator]}));31+expectError(execaSync('unicorns', {stderr: [invalidReturnGenerator]}));32+33+expectError(await execa('unicorns', {stdio: invalidReturnGenerator}));34+expectError(execaSync('unicorns', {stdio: invalidReturnGenerator}));35+36+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGenerator]}));37+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGenerator]}));38+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGenerator]]}));39+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGenerator]]}));40+41+expectNotAssignable<StdinOption>(invalidReturnGenerator);42+expectNotAssignable<StdinOptionSync>(invalidReturnGenerator);43+expectNotAssignable<StdinOption>([invalidReturnGenerator]);44+expectNotAssignable<StdinOptionSync>([invalidReturnGenerator]);45+46+expectNotAssignable<StdoutStderrOption>(invalidReturnGenerator);47+expectNotAssignable<StdoutStderrOptionSync>(invalidReturnGenerator);48+expectNotAssignable<StdoutStderrOption>([invalidReturnGenerator]);49+expectNotAssignable<StdoutStderrOptionSync>([invalidReturnGenerator]);50+51+expectNotAssignable<StdioOption>(invalidReturnGenerator);52+expectNotAssignable<StdioOptionSync>(invalidReturnGenerator);53+expectNotAssignable<StdioOption>([invalidReturnGenerator]);54+expectNotAssignable<StdioOptionSync>([invalidReturnGenerator]);added:test-d/stdio/option/generator-object-full.test-d.ts+56 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const objectGeneratorFull = {14+ * transform(line: unknown) {15+ yield JSON.parse(line as string) as object;16+ },17+ objectMode: true,18+} as const;19+20+await execa('unicorns', {stdin: objectGeneratorFull});21+execaSync('unicorns', {stdin: objectGeneratorFull});22+await execa('unicorns', {stdin: [objectGeneratorFull]});23+execaSync('unicorns', {stdin: [objectGeneratorFull]});24+25+await execa('unicorns', {stdout: objectGeneratorFull});26+execaSync('unicorns', {stdout: objectGeneratorFull});27+await execa('unicorns', {stdout: [objectGeneratorFull]});28+execaSync('unicorns', {stdout: [objectGeneratorFull]});29+30+await execa('unicorns', {stderr: objectGeneratorFull});31+execaSync('unicorns', {stderr: objectGeneratorFull});32+await execa('unicorns', {stderr: [objectGeneratorFull]});33+execaSync('unicorns', {stderr: [objectGeneratorFull]});34+35+expectError(await execa('unicorns', {stdio: objectGeneratorFull}));36+expectError(execaSync('unicorns', {stdio: objectGeneratorFull}));37+38+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGeneratorFull]});39+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGeneratorFull]});40+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGeneratorFull]]});41+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGeneratorFull]]});42+43+expectAssignable<StdinOption>(objectGeneratorFull);44+expectAssignable<StdinOptionSync>(objectGeneratorFull);45+expectAssignable<StdinOption>([objectGeneratorFull]);46+expectAssignable<StdinOptionSync>([objectGeneratorFull]);47+48+expectAssignable<StdoutStderrOption>(objectGeneratorFull);49+expectAssignable<StdoutStderrOptionSync>(objectGeneratorFull);50+expectAssignable<StdoutStderrOption>([objectGeneratorFull]);51+expectAssignable<StdoutStderrOptionSync>([objectGeneratorFull]);52+53+expectAssignable<StdioOption>(objectGeneratorFull);54+expectAssignable<StdioOptionSync>(objectGeneratorFull);55+expectAssignable<StdioOption>([objectGeneratorFull]);56+expectAssignable<StdioOptionSync>([objectGeneratorFull]);added:test-d/stdio/option/generator-object-mode-invalid.test-d.ts+56 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const transformWithInvalidObjectMode = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ objectMode: 'true',18+} as const;19+20+expectError(await execa('unicorns', {stdin: transformWithInvalidObjectMode}));21+expectError(execaSync('unicorns', {stdin: transformWithInvalidObjectMode}));22+expectError(await execa('unicorns', {stdin: [transformWithInvalidObjectMode]}));23+expectError(execaSync('unicorns', {stdin: [transformWithInvalidObjectMode]}));24+25+expectError(await execa('unicorns', {stdout: transformWithInvalidObjectMode}));26+expectError(execaSync('unicorns', {stdout: transformWithInvalidObjectMode}));27+expectError(await execa('unicorns', {stdout: [transformWithInvalidObjectMode]}));28+expectError(execaSync('unicorns', {stdout: [transformWithInvalidObjectMode]}));29+30+expectError(await execa('unicorns', {stderr: transformWithInvalidObjectMode}));31+expectError(execaSync('unicorns', {stderr: transformWithInvalidObjectMode}));32+expectError(await execa('unicorns', {stderr: [transformWithInvalidObjectMode]}));33+expectError(execaSync('unicorns', {stderr: [transformWithInvalidObjectMode]}));34+35+expectError(await execa('unicorns', {stdio: transformWithInvalidObjectMode}));36+expectError(execaSync('unicorns', {stdio: transformWithInvalidObjectMode}));37+38+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidObjectMode]}));39+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidObjectMode]}));40+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidObjectMode]]}));41+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidObjectMode]]}));42+43+expectNotAssignable<StdinOption>(transformWithInvalidObjectMode);44+expectNotAssignable<StdinOptionSync>(transformWithInvalidObjectMode);45+expectNotAssignable<StdinOption>([transformWithInvalidObjectMode]);46+expectNotAssignable<StdinOptionSync>([transformWithInvalidObjectMode]);47+48+expectNotAssignable<StdoutStderrOption>(transformWithInvalidObjectMode);49+expectNotAssignable<StdoutStderrOptionSync>(transformWithInvalidObjectMode);50+expectNotAssignable<StdoutStderrOption>([transformWithInvalidObjectMode]);51+expectNotAssignable<StdoutStderrOptionSync>([transformWithInvalidObjectMode]);52+53+expectNotAssignable<StdioOption>(transformWithInvalidObjectMode);54+expectNotAssignable<StdioOptionSync>(transformWithInvalidObjectMode);55+expectNotAssignable<StdioOption>([transformWithInvalidObjectMode]);56+expectNotAssignable<StdioOptionSync>([transformWithInvalidObjectMode]);added:test-d/stdio/option/generator-object-mode.test-d.ts+56 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const transformWithObjectMode = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ objectMode: true,18+} as const;19+20+await execa('unicorns', {stdin: transformWithObjectMode});21+execaSync('unicorns', {stdin: transformWithObjectMode});22+await execa('unicorns', {stdin: [transformWithObjectMode]});23+execaSync('unicorns', {stdin: [transformWithObjectMode]});24+25+await execa('unicorns', {stdout: transformWithObjectMode});26+execaSync('unicorns', {stdout: transformWithObjectMode});27+await execa('unicorns', {stdout: [transformWithObjectMode]});28+execaSync('unicorns', {stdout: [transformWithObjectMode]});29+30+await execa('unicorns', {stderr: transformWithObjectMode});31+execaSync('unicorns', {stderr: transformWithObjectMode});32+await execa('unicorns', {stderr: [transformWithObjectMode]});33+execaSync('unicorns', {stderr: [transformWithObjectMode]});34+35+expectError(await execa('unicorns', {stdio: transformWithObjectMode}));36+expectError(execaSync('unicorns', {stdio: transformWithObjectMode}));37+38+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithObjectMode]});39+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithObjectMode]});40+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithObjectMode]]});41+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithObjectMode]]});42+43+expectAssignable<StdinOption>(transformWithObjectMode);44+expectAssignable<StdinOptionSync>(transformWithObjectMode);45+expectAssignable<StdinOption>([transformWithObjectMode]);46+expectAssignable<StdinOptionSync>([transformWithObjectMode]);47+48+expectAssignable<StdoutStderrOption>(transformWithObjectMode);49+expectAssignable<StdoutStderrOptionSync>(transformWithObjectMode);50+expectAssignable<StdoutStderrOption>([transformWithObjectMode]);51+expectAssignable<StdoutStderrOptionSync>([transformWithObjectMode]);52+53+expectAssignable<StdioOption>(transformWithObjectMode);54+expectAssignable<StdioOptionSync>(transformWithObjectMode);55+expectAssignable<StdioOption>([transformWithObjectMode]);56+expectAssignable<StdioOptionSync>([transformWithObjectMode]);added:test-d/stdio/option/generator-object.test-d.ts+53 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const objectGenerator = function * (line: unknown) {14+ yield JSON.parse(line as string) as object;15+};16+17+await execa('unicorns', {stdin: objectGenerator});18+execaSync('unicorns', {stdin: objectGenerator});19+await execa('unicorns', {stdin: [objectGenerator]});20+execaSync('unicorns', {stdin: [objectGenerator]});21+22+await execa('unicorns', {stdout: objectGenerator});23+execaSync('unicorns', {stdout: objectGenerator});24+await execa('unicorns', {stdout: [objectGenerator]});25+execaSync('unicorns', {stdout: [objectGenerator]});26+27+await execa('unicorns', {stderr: objectGenerator});28+execaSync('unicorns', {stderr: objectGenerator});29+await execa('unicorns', {stderr: [objectGenerator]});30+execaSync('unicorns', {stderr: [objectGenerator]});31+32+expectError(await execa('unicorns', {stdio: objectGenerator}));33+expectError(execaSync('unicorns', {stdio: objectGenerator}));34+35+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGenerator]});36+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGenerator]});37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGenerator]]});38+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGenerator]]});39+40+expectAssignable<StdinOption>(objectGenerator);41+expectAssignable<StdinOptionSync>(objectGenerator);42+expectAssignable<StdinOption>([objectGenerator]);43+expectAssignable<StdinOptionSync>([objectGenerator]);44+45+expectAssignable<StdoutStderrOption>(objectGenerator);46+expectAssignable<StdoutStderrOptionSync>(objectGenerator);47+expectAssignable<StdoutStderrOption>([objectGenerator]);48+expectAssignable<StdoutStderrOptionSync>([objectGenerator]);49+50+expectAssignable<StdioOption>(objectGenerator);51+expectAssignable<StdioOptionSync>(objectGenerator);52+expectAssignable<StdioOption>([objectGenerator]);53+expectAssignable<StdioOptionSync>([objectGenerator]);added:test-d/stdio/option/generator-only-binary.test-d.ts+51 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const binaryOnly = {binary: true} as const;14+15+expectError(await execa('unicorns', {stdin: binaryOnly}));16+expectError(execaSync('unicorns', {stdin: binaryOnly}));17+expectError(await execa('unicorns', {stdin: [binaryOnly]}));18+expectError(execaSync('unicorns', {stdin: [binaryOnly]}));19+20+expectError(await execa('unicorns', {stdout: binaryOnly}));21+expectError(execaSync('unicorns', {stdout: binaryOnly}));22+expectError(await execa('unicorns', {stdout: [binaryOnly]}));23+expectError(execaSync('unicorns', {stdout: [binaryOnly]}));24+25+expectError(await execa('unicorns', {stderr: binaryOnly}));26+expectError(execaSync('unicorns', {stderr: binaryOnly}));27+expectError(await execa('unicorns', {stderr: [binaryOnly]}));28+expectError(execaSync('unicorns', {stderr: [binaryOnly]}));29+30+expectError(await execa('unicorns', {stdio: binaryOnly}));31+expectError(execaSync('unicorns', {stdio: binaryOnly}));32+33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryOnly]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryOnly]}));35+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryOnly]]}));36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryOnly]]}));37+38+expectNotAssignable<StdinOption>(binaryOnly);39+expectNotAssignable<StdinOptionSync>(binaryOnly);40+expectNotAssignable<StdinOption>([binaryOnly]);41+expectNotAssignable<StdinOptionSync>([binaryOnly]);42+43+expectNotAssignable<StdoutStderrOption>(binaryOnly);44+expectNotAssignable<StdoutStderrOptionSync>(binaryOnly);45+expectNotAssignable<StdoutStderrOption>([binaryOnly]);46+expectNotAssignable<StdoutStderrOptionSync>([binaryOnly]);47+48+expectNotAssignable<StdioOption>(binaryOnly);49+expectNotAssignable<StdioOptionSync>(binaryOnly);50+expectNotAssignable<StdioOption>([binaryOnly]);51+expectNotAssignable<StdioOptionSync>([binaryOnly]);added:test-d/stdio/option/generator-only-final.test-d.ts+55 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const finalOnly = {14+ * final() {15+ yield {} as unknown;16+ },17+} as const;18+19+expectError(await execa('unicorns', {stdin: finalOnly}));20+expectError(execaSync('unicorns', {stdin: finalOnly}));21+expectError(await execa('unicorns', {stdin: [finalOnly]}));22+expectError(execaSync('unicorns', {stdin: [finalOnly]}));23+24+expectError(await execa('unicorns', {stdout: finalOnly}));25+expectError(execaSync('unicorns', {stdout: finalOnly}));26+expectError(await execa('unicorns', {stdout: [finalOnly]}));27+expectError(execaSync('unicorns', {stdout: [finalOnly]}));28+29+expectError(await execa('unicorns', {stderr: finalOnly}));30+expectError(execaSync('unicorns', {stderr: finalOnly}));31+expectError(await execa('unicorns', {stderr: [finalOnly]}));32+expectError(execaSync('unicorns', {stderr: [finalOnly]}));33+34+expectError(await execa('unicorns', {stdio: finalOnly}));35+expectError(execaSync('unicorns', {stdio: finalOnly}));36+37+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', finalOnly]}));38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', finalOnly]}));39+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [finalOnly]]}));40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [finalOnly]]}));41+42+expectNotAssignable<StdinOption>(finalOnly);43+expectNotAssignable<StdinOptionSync>(finalOnly);44+expectNotAssignable<StdinOption>([finalOnly]);45+expectNotAssignable<StdinOptionSync>([finalOnly]);46+47+expectNotAssignable<StdoutStderrOption>(finalOnly);48+expectNotAssignable<StdoutStderrOptionSync>(finalOnly);49+expectNotAssignable<StdoutStderrOption>([finalOnly]);50+expectNotAssignable<StdoutStderrOptionSync>([finalOnly]);51+52+expectNotAssignable<StdioOption>(finalOnly);53+expectNotAssignable<StdioOptionSync>(finalOnly);54+expectNotAssignable<StdioOption>([finalOnly]);55+expectNotAssignable<StdioOptionSync>([finalOnly]);added:test-d/stdio/option/generator-only-object-mode.test-d.ts+51 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const objectModeOnly = {objectMode: true} as const;14+15+expectError(await execa('unicorns', {stdin: objectModeOnly}));16+expectError(execaSync('unicorns', {stdin: objectModeOnly}));17+expectError(await execa('unicorns', {stdin: [objectModeOnly]}));18+expectError(execaSync('unicorns', {stdin: [objectModeOnly]}));19+20+expectError(await execa('unicorns', {stdout: objectModeOnly}));21+expectError(execaSync('unicorns', {stdout: objectModeOnly}));22+expectError(await execa('unicorns', {stdout: [objectModeOnly]}));23+expectError(execaSync('unicorns', {stdout: [objectModeOnly]}));24+25+expectError(await execa('unicorns', {stderr: objectModeOnly}));26+expectError(execaSync('unicorns', {stderr: objectModeOnly}));27+expectError(await execa('unicorns', {stderr: [objectModeOnly]}));28+expectError(execaSync('unicorns', {stderr: [objectModeOnly]}));29+30+expectError(await execa('unicorns', {stdio: objectModeOnly}));31+expectError(execaSync('unicorns', {stdio: objectModeOnly}));32+33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectModeOnly]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectModeOnly]}));35+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectModeOnly]]}));36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectModeOnly]]}));37+38+expectNotAssignable<StdinOption>(objectModeOnly);39+expectNotAssignable<StdinOptionSync>(objectModeOnly);40+expectNotAssignable<StdinOption>([objectModeOnly]);41+expectNotAssignable<StdinOptionSync>([objectModeOnly]);42+43+expectNotAssignable<StdoutStderrOption>(objectModeOnly);44+expectNotAssignable<StdoutStderrOptionSync>(objectModeOnly);45+expectNotAssignable<StdoutStderrOption>([objectModeOnly]);46+expectNotAssignable<StdoutStderrOptionSync>([objectModeOnly]);47+48+expectNotAssignable<StdioOption>(objectModeOnly);49+expectNotAssignable<StdioOptionSync>(objectModeOnly);50+expectNotAssignable<StdioOption>([objectModeOnly]);51+expectNotAssignable<StdioOptionSync>([objectModeOnly]);added:test-d/stdio/option/generator-only-preserve.test-d.ts+51 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const preserveNewlinesOnly = {preserveNewlines: true} as const;14+15+expectError(await execa('unicorns', {stdin: preserveNewlinesOnly}));16+expectError(execaSync('unicorns', {stdin: preserveNewlinesOnly}));17+expectError(await execa('unicorns', {stdin: [preserveNewlinesOnly]}));18+expectError(execaSync('unicorns', {stdin: [preserveNewlinesOnly]}));19+20+expectError(await execa('unicorns', {stdout: preserveNewlinesOnly}));21+expectError(execaSync('unicorns', {stdout: preserveNewlinesOnly}));22+expectError(await execa('unicorns', {stdout: [preserveNewlinesOnly]}));23+expectError(execaSync('unicorns', {stdout: [preserveNewlinesOnly]}));24+25+expectError(await execa('unicorns', {stderr: preserveNewlinesOnly}));26+expectError(execaSync('unicorns', {stderr: preserveNewlinesOnly}));27+expectError(await execa('unicorns', {stderr: [preserveNewlinesOnly]}));28+expectError(execaSync('unicorns', {stderr: [preserveNewlinesOnly]}));29+30+expectError(await execa('unicorns', {stdio: preserveNewlinesOnly}));31+expectError(execaSync('unicorns', {stdio: preserveNewlinesOnly}));32+33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', preserveNewlinesOnly]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', preserveNewlinesOnly]}));35+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [preserveNewlinesOnly]]}));36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [preserveNewlinesOnly]]}));37+38+expectNotAssignable<StdinOption>(preserveNewlinesOnly);39+expectNotAssignable<StdinOptionSync>(preserveNewlinesOnly);40+expectNotAssignable<StdinOption>([preserveNewlinesOnly]);41+expectNotAssignable<StdinOptionSync>([preserveNewlinesOnly]);42+43+expectNotAssignable<StdoutStderrOption>(preserveNewlinesOnly);44+expectNotAssignable<StdoutStderrOptionSync>(preserveNewlinesOnly);45+expectNotAssignable<StdoutStderrOption>([preserveNewlinesOnly]);46+expectNotAssignable<StdoutStderrOptionSync>([preserveNewlinesOnly]);47+48+expectNotAssignable<StdioOption>(preserveNewlinesOnly);49+expectNotAssignable<StdioOptionSync>(preserveNewlinesOnly);50+expectNotAssignable<StdioOption>([preserveNewlinesOnly]);51+expectNotAssignable<StdioOptionSync>([preserveNewlinesOnly]);added:test-d/stdio/option/generator-preserve-invalid.test-d.ts+56 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const transformWithInvalidPreserveNewlines = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ preserveNewlines: 'true',18+} as const;19+20+expectError(await execa('unicorns', {stdin: transformWithInvalidPreserveNewlines}));21+expectError(execaSync('unicorns', {stdin: transformWithInvalidPreserveNewlines}));22+expectError(await execa('unicorns', {stdin: [transformWithInvalidPreserveNewlines]}));23+expectError(execaSync('unicorns', {stdin: [transformWithInvalidPreserveNewlines]}));24+25+expectError(await execa('unicorns', {stdout: transformWithInvalidPreserveNewlines}));26+expectError(execaSync('unicorns', {stdout: transformWithInvalidPreserveNewlines}));27+expectError(await execa('unicorns', {stdout: [transformWithInvalidPreserveNewlines]}));28+expectError(execaSync('unicorns', {stdout: [transformWithInvalidPreserveNewlines]}));29+30+expectError(await execa('unicorns', {stderr: transformWithInvalidPreserveNewlines}));31+expectError(execaSync('unicorns', {stderr: transformWithInvalidPreserveNewlines}));32+expectError(await execa('unicorns', {stderr: [transformWithInvalidPreserveNewlines]}));33+expectError(execaSync('unicorns', {stderr: [transformWithInvalidPreserveNewlines]}));34+35+expectError(await execa('unicorns', {stdio: transformWithInvalidPreserveNewlines}));36+expectError(execaSync('unicorns', {stdio: transformWithInvalidPreserveNewlines}));37+38+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidPreserveNewlines]}));39+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidPreserveNewlines]}));40+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidPreserveNewlines]]}));41+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidPreserveNewlines]]}));42+43+expectNotAssignable<StdinOption>(transformWithInvalidPreserveNewlines);44+expectNotAssignable<StdinOptionSync>(transformWithInvalidPreserveNewlines);45+expectNotAssignable<StdinOption>([transformWithInvalidPreserveNewlines]);46+expectNotAssignable<StdinOptionSync>([transformWithInvalidPreserveNewlines]);47+48+expectNotAssignable<StdoutStderrOption>(transformWithInvalidPreserveNewlines);49+expectNotAssignable<StdoutStderrOptionSync>(transformWithInvalidPreserveNewlines);50+expectNotAssignable<StdoutStderrOption>([transformWithInvalidPreserveNewlines]);51+expectNotAssignable<StdoutStderrOptionSync>([transformWithInvalidPreserveNewlines]);52+53+expectNotAssignable<StdioOption>(transformWithInvalidPreserveNewlines);54+expectNotAssignable<StdioOptionSync>(transformWithInvalidPreserveNewlines);55+expectNotAssignable<StdioOption>([transformWithInvalidPreserveNewlines]);56+expectNotAssignable<StdioOptionSync>([transformWithInvalidPreserveNewlines]);added:test-d/stdio/option/generator-preserve.test-d.ts+56 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const transformWithPreserveNewlines = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ preserveNewlines: true,18+} as const;19+20+await execa('unicorns', {stdin: transformWithPreserveNewlines});21+execaSync('unicorns', {stdin: transformWithPreserveNewlines});22+await execa('unicorns', {stdin: [transformWithPreserveNewlines]});23+execaSync('unicorns', {stdin: [transformWithPreserveNewlines]});24+25+await execa('unicorns', {stdout: transformWithPreserveNewlines});26+execaSync('unicorns', {stdout: transformWithPreserveNewlines});27+await execa('unicorns', {stdout: [transformWithPreserveNewlines]});28+execaSync('unicorns', {stdout: [transformWithPreserveNewlines]});29+30+await execa('unicorns', {stderr: transformWithPreserveNewlines});31+execaSync('unicorns', {stderr: transformWithPreserveNewlines});32+await execa('unicorns', {stderr: [transformWithPreserveNewlines]});33+execaSync('unicorns', {stderr: [transformWithPreserveNewlines]});34+35+expectError(await execa('unicorns', {stdio: transformWithPreserveNewlines}));36+expectError(execaSync('unicorns', {stdio: transformWithPreserveNewlines}));37+38+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithPreserveNewlines]});39+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithPreserveNewlines]});40+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithPreserveNewlines]]});41+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithPreserveNewlines]]});42+43+expectAssignable<StdinOption>(transformWithPreserveNewlines);44+expectAssignable<StdinOptionSync>(transformWithPreserveNewlines);45+expectAssignable<StdinOption>([transformWithPreserveNewlines]);46+expectAssignable<StdinOptionSync>([transformWithPreserveNewlines]);47+48+expectAssignable<StdoutStderrOption>(transformWithPreserveNewlines);49+expectAssignable<StdoutStderrOptionSync>(transformWithPreserveNewlines);50+expectAssignable<StdoutStderrOption>([transformWithPreserveNewlines]);51+expectAssignable<StdoutStderrOptionSync>([transformWithPreserveNewlines]);52+53+expectAssignable<StdioOption>(transformWithPreserveNewlines);54+expectAssignable<StdioOptionSync>(transformWithPreserveNewlines);55+expectAssignable<StdioOption>([transformWithPreserveNewlines]);56+expectAssignable<StdioOptionSync>([transformWithPreserveNewlines]);added:test-d/stdio/option/generator-string-full.test-d.ts+55 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const stringGeneratorFull = {14+ * transform(line: string) {15+ yield line;16+ },17+} as const;18+19+expectError(await execa('unicorns', {stdin: stringGeneratorFull}));20+expectError(execaSync('unicorns', {stdin: stringGeneratorFull}));21+expectError(await execa('unicorns', {stdin: [stringGeneratorFull]}));22+expectError(execaSync('unicorns', {stdin: [stringGeneratorFull]}));23+24+expectError(await execa('unicorns', {stdout: stringGeneratorFull}));25+expectError(execaSync('unicorns', {stdout: stringGeneratorFull}));26+expectError(await execa('unicorns', {stdout: [stringGeneratorFull]}));27+expectError(execaSync('unicorns', {stdout: [stringGeneratorFull]}));28+29+expectError(await execa('unicorns', {stderr: stringGeneratorFull}));30+expectError(execaSync('unicorns', {stderr: stringGeneratorFull}));31+expectError(await execa('unicorns', {stderr: [stringGeneratorFull]}));32+expectError(execaSync('unicorns', {stderr: [stringGeneratorFull]}));33+34+expectError(await execa('unicorns', {stdio: stringGeneratorFull}));35+expectError(execaSync('unicorns', {stdio: stringGeneratorFull}));36+37+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGeneratorFull]}));38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGeneratorFull]}));39+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGeneratorFull]]}));40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGeneratorFull]]}));41+42+expectNotAssignable<StdinOption>(stringGeneratorFull);43+expectNotAssignable<StdinOptionSync>(stringGeneratorFull);44+expectNotAssignable<StdinOption>([stringGeneratorFull]);45+expectNotAssignable<StdinOptionSync>([stringGeneratorFull]);46+47+expectNotAssignable<StdoutStderrOption>(stringGeneratorFull);48+expectNotAssignable<StdoutStderrOptionSync>(stringGeneratorFull);49+expectNotAssignable<StdoutStderrOption>([stringGeneratorFull]);50+expectNotAssignable<StdoutStderrOptionSync>([stringGeneratorFull]);51+52+expectNotAssignable<StdioOption>(stringGeneratorFull);53+expectNotAssignable<StdioOptionSync>(stringGeneratorFull);54+expectNotAssignable<StdioOption>([stringGeneratorFull]);55+expectNotAssignable<StdioOptionSync>([stringGeneratorFull]);added:test-d/stdio/option/generator-string.test-d.ts+53 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const stringGenerator = function * (line: string) {14+ yield line;15+};16+17+expectError(await execa('unicorns', {stdin: stringGenerator}));18+expectError(execaSync('unicorns', {stdin: stringGenerator}));19+expectError(await execa('unicorns', {stdin: [stringGenerator]}));20+expectError(execaSync('unicorns', {stdin: [stringGenerator]}));21+22+expectError(await execa('unicorns', {stdout: stringGenerator}));23+expectError(execaSync('unicorns', {stdout: stringGenerator}));24+expectError(await execa('unicorns', {stdout: [stringGenerator]}));25+expectError(execaSync('unicorns', {stdout: [stringGenerator]}));26+27+expectError(await execa('unicorns', {stderr: stringGenerator}));28+expectError(execaSync('unicorns', {stderr: stringGenerator}));29+expectError(await execa('unicorns', {stderr: [stringGenerator]}));30+expectError(execaSync('unicorns', {stderr: [stringGenerator]}));31+32+expectError(await execa('unicorns', {stdio: stringGenerator}));33+expectError(execaSync('unicorns', {stdio: stringGenerator}));34+35+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGenerator]}));36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGenerator]}));37+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGenerator]]}));38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGenerator]]}));39+40+expectNotAssignable<StdinOption>(stringGenerator);41+expectNotAssignable<StdinOptionSync>(stringGenerator);42+expectNotAssignable<StdinOption>([stringGenerator]);43+expectNotAssignable<StdinOptionSync>([stringGenerator]);44+45+expectNotAssignable<StdoutStderrOption>(stringGenerator);46+expectNotAssignable<StdoutStderrOptionSync>(stringGenerator);47+expectNotAssignable<StdoutStderrOption>([stringGenerator]);48+expectNotAssignable<StdoutStderrOptionSync>([stringGenerator]);49+50+expectNotAssignable<StdioOption>(stringGenerator);51+expectNotAssignable<StdioOptionSync>(stringGenerator);52+expectNotAssignable<StdioOption>([stringGenerator]);53+expectNotAssignable<StdioOptionSync>([stringGenerator]);added:test-d/stdio/option/generator-unknown-full.test-d.ts+56 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const unknownGeneratorFull = {14+ * transform(line: unknown) {15+ yield line;16+ },17+ objectMode: true,18+} as const;19+20+await execa('unicorns', {stdin: unknownGeneratorFull});21+execaSync('unicorns', {stdin: unknownGeneratorFull});22+await execa('unicorns', {stdin: [unknownGeneratorFull]});23+execaSync('unicorns', {stdin: [unknownGeneratorFull]});24+25+await execa('unicorns', {stdout: unknownGeneratorFull});26+execaSync('unicorns', {stdout: unknownGeneratorFull});27+await execa('unicorns', {stdout: [unknownGeneratorFull]});28+execaSync('unicorns', {stdout: [unknownGeneratorFull]});29+30+await execa('unicorns', {stderr: unknownGeneratorFull});31+execaSync('unicorns', {stderr: unknownGeneratorFull});32+await execa('unicorns', {stderr: [unknownGeneratorFull]});33+execaSync('unicorns', {stderr: [unknownGeneratorFull]});34+35+expectError(await execa('unicorns', {stdio: unknownGeneratorFull}));36+expectError(execaSync('unicorns', {stdio: unknownGeneratorFull}));37+38+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGeneratorFull]});39+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGeneratorFull]});40+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGeneratorFull]]});41+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGeneratorFull]]});42+43+expectAssignable<StdinOption>(unknownGeneratorFull);44+expectAssignable<StdinOptionSync>(unknownGeneratorFull);45+expectAssignable<StdinOption>([unknownGeneratorFull]);46+expectAssignable<StdinOptionSync>([unknownGeneratorFull]);47+48+expectAssignable<StdoutStderrOption>(unknownGeneratorFull);49+expectAssignable<StdoutStderrOptionSync>(unknownGeneratorFull);50+expectAssignable<StdoutStderrOption>([unknownGeneratorFull]);51+expectAssignable<StdoutStderrOptionSync>([unknownGeneratorFull]);52+53+expectAssignable<StdioOption>(unknownGeneratorFull);54+expectAssignable<StdioOptionSync>(unknownGeneratorFull);55+expectAssignable<StdioOption>([unknownGeneratorFull]);56+expectAssignable<StdioOptionSync>([unknownGeneratorFull]);added:test-d/stdio/option/generator-unknown.test-d.ts+53 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const unknownGenerator = function * (line: unknown) {14+ yield line;15+};16+17+await execa('unicorns', {stdin: unknownGenerator});18+execaSync('unicorns', {stdin: unknownGenerator});19+await execa('unicorns', {stdin: [unknownGenerator]});20+execaSync('unicorns', {stdin: [unknownGenerator]});21+22+await execa('unicorns', {stdout: unknownGenerator});23+execaSync('unicorns', {stdout: unknownGenerator});24+await execa('unicorns', {stdout: [unknownGenerator]});25+execaSync('unicorns', {stdout: [unknownGenerator]});26+27+await execa('unicorns', {stderr: unknownGenerator});28+execaSync('unicorns', {stderr: unknownGenerator});29+await execa('unicorns', {stderr: [unknownGenerator]});30+execaSync('unicorns', {stderr: [unknownGenerator]});31+32+expectError(await execa('unicorns', {stdio: unknownGenerator}));33+expectError(execaSync('unicorns', {stdio: unknownGenerator}));34+35+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGenerator]});36+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGenerator]});37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGenerator]]});38+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGenerator]]});39+40+expectAssignable<StdinOption>(unknownGenerator);41+expectAssignable<StdinOptionSync>(unknownGenerator);42+expectAssignable<StdinOption>([unknownGenerator]);43+expectAssignable<StdinOptionSync>([unknownGenerator]);44+45+expectAssignable<StdoutStderrOption>(unknownGenerator);46+expectAssignable<StdoutStderrOptionSync>(unknownGenerator);47+expectAssignable<StdoutStderrOption>([unknownGenerator]);48+expectAssignable<StdoutStderrOptionSync>([unknownGenerator]);49+50+expectAssignable<StdioOption>(unknownGenerator);51+expectAssignable<StdioOptionSync>(unknownGenerator);52+expectAssignable<StdioOption>([unknownGenerator]);53+expectAssignable<StdioOptionSync>([unknownGenerator]);added:test-d/stdio/option/ignore.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: 'ignore'});14+execaSync('unicorns', {stdin: 'ignore'});15+expectError(await execa('unicorns', {stdin: ['ignore']}));16+expectError(execaSync('unicorns', {stdin: ['ignore']}));17+18+await execa('unicorns', {stdout: 'ignore'});19+execaSync('unicorns', {stdout: 'ignore'});20+expectError(await execa('unicorns', {stdout: ['ignore']}));21+expectError(execaSync('unicorns', {stdout: ['ignore']}));22+23+await execa('unicorns', {stderr: 'ignore'});24+execaSync('unicorns', {stderr: 'ignore'});25+expectError(await execa('unicorns', {stderr: ['ignore']}));26+expectError(execaSync('unicorns', {stderr: ['ignore']}));27+28+await execa('unicorns', {stdio: 'ignore'});29+execaSync('unicorns', {stdio: 'ignore'});30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ignore']]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ignore']]}));35+36+expectAssignable<StdinOption>('ignore');37+expectAssignable<StdinOptionSync>('ignore');38+expectNotAssignable<StdinOption>(['ignore']);39+expectNotAssignable<StdinOptionSync>(['ignore']);40+41+expectAssignable<StdoutStderrOption>('ignore');42+expectAssignable<StdoutStderrOptionSync>('ignore');43+expectNotAssignable<StdoutStderrOption>(['ignore']);44+expectNotAssignable<StdoutStderrOptionSync>(['ignore']);45+46+expectAssignable<StdioOption>('ignore');47+expectAssignable<StdioOptionSync>('ignore');48+expectNotAssignable<StdioOption>(['ignore']);49+expectNotAssignable<StdioOptionSync>(['ignore']);added:test-d/stdio/option/inherit.test-d.ts+49 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: 'inherit'});14+execaSync('unicorns', {stdin: 'inherit'});15+await execa('unicorns', {stdin: ['inherit']});16+execaSync('unicorns', {stdin: ['inherit']});17+18+await execa('unicorns', {stdout: 'inherit'});19+execaSync('unicorns', {stdout: 'inherit'});20+await execa('unicorns', {stdout: ['inherit']});21+execaSync('unicorns', {stdout: ['inherit']});22+23+await execa('unicorns', {stderr: 'inherit'});24+execaSync('unicorns', {stderr: 'inherit'});25+await execa('unicorns', {stderr: ['inherit']});26+execaSync('unicorns', {stderr: ['inherit']});27+28+await execa('unicorns', {stdio: 'inherit'});29+execaSync('unicorns', {stdio: 'inherit'});30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'inherit']});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'inherit']});33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['inherit']]}));34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['inherit']]});35+36+expectAssignable<StdinOption>('inherit');37+expectAssignable<StdinOptionSync>('inherit');38+expectAssignable<StdinOption>(['inherit']);39+expectAssignable<StdinOptionSync>(['inherit']);40+41+expectAssignable<StdoutStderrOption>('inherit');42+expectAssignable<StdoutStderrOptionSync>('inherit');43+expectAssignable<StdoutStderrOption>(['inherit']);44+expectAssignable<StdoutStderrOptionSync>(['inherit']);45+46+expectAssignable<StdioOption>('inherit');47+expectAssignable<StdioOptionSync>('inherit');48+expectAssignable<StdioOption>(['inherit']);49+expectAssignable<StdioOptionSync>(['inherit']);added:test-d/stdio/option/ipc.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: 'ipc'});14+expectError(execaSync('unicorns', {stdin: 'ipc'}));15+expectError(await execa('unicorns', {stdin: ['ipc']}));16+expectError(execaSync('unicorns', {stdin: ['ipc']}));17+18+await execa('unicorns', {stdout: 'ipc'});19+expectError(execaSync('unicorns', {stdout: 'ipc'}));20+expectError(await execa('unicorns', {stdout: ['ipc']}));21+expectError(execaSync('unicorns', {stdout: ['ipc']}));22+23+await execa('unicorns', {stderr: 'ipc'});24+expectError(execaSync('unicorns', {stderr: 'ipc'}));25+expectError(await execa('unicorns', {stderr: ['ipc']}));26+expectError(execaSync('unicorns', {stderr: ['ipc']}));27+28+expectError(await execa('unicorns', {stdio: 'ipc'}));29+expectError(execaSync('unicorns', {stdio: 'ipc'}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']});32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']}));33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ipc']]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ipc']]}));35+36+expectAssignable<StdinOption>('ipc');37+expectNotAssignable<StdinOptionSync>('ipc');38+expectNotAssignable<StdinOption>(['ipc']);39+expectNotAssignable<StdinOptionSync>(['ipc']);40+41+expectAssignable<StdoutStderrOption>('ipc');42+expectNotAssignable<StdoutStderrOptionSync>('ipc');43+expectNotAssignable<StdoutStderrOption>(['ipc']);44+expectNotAssignable<StdoutStderrOptionSync>(['ipc']);45+46+expectAssignable<StdioOption>('ipc');47+expectNotAssignable<StdioOptionSync>('ipc');48+expectNotAssignable<StdioOption>(['ipc']);49+expectNotAssignable<StdioOptionSync>(['ipc']);added:test-d/stdio/option/iterable-async-binary.test-d.ts+55 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const asyncBinaryIterableFunction = async function * () {14+ yield new Uint8Array(0);15+};16+17+const asyncBinaryIterable = asyncBinaryIterableFunction();18+19+await execa('unicorns', {stdin: asyncBinaryIterable});20+expectError(execaSync('unicorns', {stdin: asyncBinaryIterable}));21+await execa('unicorns', {stdin: [asyncBinaryIterable]});22+expectError(execaSync('unicorns', {stdin: [asyncBinaryIterable]}));23+24+expectError(await execa('unicorns', {stdout: asyncBinaryIterable}));25+expectError(execaSync('unicorns', {stdout: asyncBinaryIterable}));26+expectError(await execa('unicorns', {stdout: [asyncBinaryIterable]}));27+expectError(execaSync('unicorns', {stdout: [asyncBinaryIterable]}));28+29+expectError(await execa('unicorns', {stderr: asyncBinaryIterable}));30+expectError(execaSync('unicorns', {stderr: asyncBinaryIterable}));31+expectError(await execa('unicorns', {stderr: [asyncBinaryIterable]}));32+expectError(execaSync('unicorns', {stderr: [asyncBinaryIterable]}));33+34+expectError(await execa('unicorns', {stdio: asyncBinaryIterable}));35+expectError(execaSync('unicorns', {stdio: asyncBinaryIterable}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncBinaryIterable]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncBinaryIterable]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncBinaryIterable]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncBinaryIterable]]}));41+42+expectAssignable<StdinOption>(asyncBinaryIterable);43+expectNotAssignable<StdinOptionSync>(asyncBinaryIterable);44+expectAssignable<StdinOption>([asyncBinaryIterable]);45+expectNotAssignable<StdinOptionSync>([asyncBinaryIterable]);46+47+expectNotAssignable<StdoutStderrOption>(asyncBinaryIterable);48+expectNotAssignable<StdoutStderrOptionSync>(asyncBinaryIterable);49+expectNotAssignable<StdoutStderrOption>([asyncBinaryIterable]);50+expectNotAssignable<StdoutStderrOptionSync>([asyncBinaryIterable]);51+52+expectAssignable<StdioOption>(asyncBinaryIterable);53+expectNotAssignable<StdioOptionSync>(asyncBinaryIterable);54+expectAssignable<StdioOption>([asyncBinaryIterable]);55+expectNotAssignable<StdioOptionSync>([asyncBinaryIterable]);added:test-d/stdio/option/iterable-async-object.test-d.ts+55 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const asyncObjectIterableFunction = async function * () {14+ yield {};15+};16+17+const asyncObjectIterable = asyncObjectIterableFunction();18+19+await execa('unicorns', {stdin: asyncObjectIterable});20+expectError(execaSync('unicorns', {stdin: asyncObjectIterable}));21+await execa('unicorns', {stdin: [asyncObjectIterable]});22+expectError(execaSync('unicorns', {stdin: [asyncObjectIterable]}));23+24+expectError(await execa('unicorns', {stdout: asyncObjectIterable}));25+expectError(execaSync('unicorns', {stdout: asyncObjectIterable}));26+expectError(await execa('unicorns', {stdout: [asyncObjectIterable]}));27+expectError(execaSync('unicorns', {stdout: [asyncObjectIterable]}));28+29+expectError(await execa('unicorns', {stderr: asyncObjectIterable}));30+expectError(execaSync('unicorns', {stderr: asyncObjectIterable}));31+expectError(await execa('unicorns', {stderr: [asyncObjectIterable]}));32+expectError(execaSync('unicorns', {stderr: [asyncObjectIterable]}));33+34+expectError(await execa('unicorns', {stdio: asyncObjectIterable}));35+expectError(execaSync('unicorns', {stdio: asyncObjectIterable}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncObjectIterable]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncObjectIterable]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncObjectIterable]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncObjectIterable]]}));41+42+expectAssignable<StdinOption>(asyncObjectIterable);43+expectNotAssignable<StdinOptionSync>(asyncObjectIterable);44+expectAssignable<StdinOption>([asyncObjectIterable]);45+expectNotAssignable<StdinOptionSync>([asyncObjectIterable]);46+47+expectNotAssignable<StdoutStderrOption>(asyncObjectIterable);48+expectNotAssignable<StdoutStderrOptionSync>(asyncObjectIterable);49+expectNotAssignable<StdoutStderrOption>([asyncObjectIterable]);50+expectNotAssignable<StdoutStderrOptionSync>([asyncObjectIterable]);51+52+expectAssignable<StdioOption>(asyncObjectIterable);53+expectNotAssignable<StdioOptionSync>(asyncObjectIterable);54+expectAssignable<StdioOption>([asyncObjectIterable]);55+expectNotAssignable<StdioOptionSync>([asyncObjectIterable]);added:test-d/stdio/option/iterable-async-string.test-d.ts+55 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const asyncStringIterableFunction = async function * () {14+ yield '';15+};16+17+const asyncStringIterable = asyncStringIterableFunction();18+19+await execa('unicorns', {stdin: asyncStringIterable});20+expectError(execaSync('unicorns', {stdin: asyncStringIterable}));21+await execa('unicorns', {stdin: [asyncStringIterable]});22+expectError(execaSync('unicorns', {stdin: [asyncStringIterable]}));23+24+expectError(await execa('unicorns', {stdout: asyncStringIterable}));25+expectError(execaSync('unicorns', {stdout: asyncStringIterable}));26+expectError(await execa('unicorns', {stdout: [asyncStringIterable]}));27+expectError(execaSync('unicorns', {stdout: [asyncStringIterable]}));28+29+expectError(await execa('unicorns', {stderr: asyncStringIterable}));30+expectError(execaSync('unicorns', {stderr: asyncStringIterable}));31+expectError(await execa('unicorns', {stderr: [asyncStringIterable]}));32+expectError(execaSync('unicorns', {stderr: [asyncStringIterable]}));33+34+expectError(await execa('unicorns', {stdio: asyncStringIterable}));35+expectError(execaSync('unicorns', {stdio: asyncStringIterable}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncStringIterable]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncStringIterable]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncStringIterable]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncStringIterable]]}));41+42+expectAssignable<StdinOption>(asyncStringIterable);43+expectNotAssignable<StdinOptionSync>(asyncStringIterable);44+expectAssignable<StdinOption>([asyncStringIterable]);45+expectNotAssignable<StdinOptionSync>([asyncStringIterable]);46+47+expectNotAssignable<StdoutStderrOption>(asyncStringIterable);48+expectNotAssignable<StdoutStderrOptionSync>(asyncStringIterable);49+expectNotAssignable<StdoutStderrOption>([asyncStringIterable]);50+expectNotAssignable<StdoutStderrOptionSync>([asyncStringIterable]);51+52+expectAssignable<StdioOption>(asyncStringIterable);53+expectNotAssignable<StdioOptionSync>(asyncStringIterable);54+expectAssignable<StdioOption>([asyncStringIterable]);55+expectNotAssignable<StdioOptionSync>([asyncStringIterable]);added:test-d/stdio/option/iterable-binary.test-d.ts+55 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const binaryIterableFunction = function * () {14+ yield new Uint8Array(0);15+};16+17+const binaryIterable = binaryIterableFunction();18+19+await execa('unicorns', {stdin: binaryIterable});20+execaSync('unicorns', {stdin: binaryIterable});21+await execa('unicorns', {stdin: [binaryIterable]});22+execaSync('unicorns', {stdin: [binaryIterable]});23+24+expectError(await execa('unicorns', {stdout: binaryIterable}));25+expectError(execaSync('unicorns', {stdout: binaryIterable}));26+expectError(await execa('unicorns', {stdout: [binaryIterable]}));27+expectError(execaSync('unicorns', {stdout: [binaryIterable]}));28+29+expectError(await execa('unicorns', {stderr: binaryIterable}));30+expectError(execaSync('unicorns', {stderr: binaryIterable}));31+expectError(await execa('unicorns', {stderr: [binaryIterable]}));32+expectError(execaSync('unicorns', {stderr: [binaryIterable]}));33+34+expectError(await execa('unicorns', {stdio: binaryIterable}));35+expectError(execaSync('unicorns', {stdio: binaryIterable}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryIterable]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryIterable]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryIterable]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryIterable]]}));41+42+expectAssignable<StdinOption>(binaryIterable);43+expectAssignable<StdinOptionSync>(binaryIterable);44+expectAssignable<StdinOption>([binaryIterable]);45+expectAssignable<StdinOptionSync>([binaryIterable]);46+47+expectNotAssignable<StdoutStderrOption>(binaryIterable);48+expectNotAssignable<StdoutStderrOptionSync>(binaryIterable);49+expectNotAssignable<StdoutStderrOption>([binaryIterable]);50+expectNotAssignable<StdoutStderrOptionSync>([binaryIterable]);51+52+expectAssignable<StdioOption>(binaryIterable);53+expectAssignable<StdioOptionSync>(binaryIterable);54+expectAssignable<StdioOption>([binaryIterable]);55+expectAssignable<StdioOptionSync>([binaryIterable]);added:test-d/stdio/option/iterable-object.test-d.ts+55 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const objectIterableFunction = function * () {14+ yield {};15+};16+17+const objectIterable = objectIterableFunction();18+19+await execa('unicorns', {stdin: objectIterable});20+execaSync('unicorns', {stdin: objectIterable});21+await execa('unicorns', {stdin: [objectIterable]});22+execaSync('unicorns', {stdin: [objectIterable]});23+24+expectError(await execa('unicorns', {stdout: objectIterable}));25+expectError(execaSync('unicorns', {stdout: objectIterable}));26+expectError(await execa('unicorns', {stdout: [objectIterable]}));27+expectError(execaSync('unicorns', {stdout: [objectIterable]}));28+29+expectError(await execa('unicorns', {stderr: objectIterable}));30+expectError(execaSync('unicorns', {stderr: objectIterable}));31+expectError(await execa('unicorns', {stderr: [objectIterable]}));32+expectError(execaSync('unicorns', {stderr: [objectIterable]}));33+34+expectError(await execa('unicorns', {stdio: objectIterable}));35+expectError(execaSync('unicorns', {stdio: objectIterable}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectIterable]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectIterable]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectIterable]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectIterable]]}));41+42+expectAssignable<StdinOption>(objectIterable);43+expectAssignable<StdinOptionSync>(objectIterable);44+expectAssignable<StdinOption>([objectIterable]);45+expectAssignable<StdinOptionSync>([objectIterable]);46+47+expectNotAssignable<StdoutStderrOption>(objectIterable);48+expectNotAssignable<StdoutStderrOptionSync>(objectIterable);49+expectNotAssignable<StdoutStderrOption>([objectIterable]);50+expectNotAssignable<StdoutStderrOptionSync>([objectIterable]);51+52+expectAssignable<StdioOption>(objectIterable);53+expectAssignable<StdioOptionSync>(objectIterable);54+expectAssignable<StdioOption>([objectIterable]);55+expectAssignable<StdioOptionSync>([objectIterable]);added:test-d/stdio/option/iterable-string.test-d.ts+55 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const stringIterableFunction = function * () {14+ yield '';15+};16+17+const stringIterable = stringIterableFunction();18+19+await execa('unicorns', {stdin: stringIterable});20+execaSync('unicorns', {stdin: stringIterable});21+await execa('unicorns', {stdin: [stringIterable]});22+execaSync('unicorns', {stdin: [stringIterable]});23+24+expectError(await execa('unicorns', {stdout: stringIterable}));25+expectError(execaSync('unicorns', {stdout: stringIterable}));26+expectError(await execa('unicorns', {stdout: [stringIterable]}));27+expectError(execaSync('unicorns', {stdout: [stringIterable]}));28+29+expectError(await execa('unicorns', {stderr: stringIterable}));30+expectError(execaSync('unicorns', {stderr: stringIterable}));31+expectError(await execa('unicorns', {stderr: [stringIterable]}));32+expectError(execaSync('unicorns', {stderr: [stringIterable]}));33+34+expectError(await execa('unicorns', {stdio: stringIterable}));35+expectError(execaSync('unicorns', {stdio: stringIterable}));36+37+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringIterable]});38+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringIterable]}));39+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringIterable]]});40+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringIterable]]}));41+42+expectAssignable<StdinOption>(stringIterable);43+expectAssignable<StdinOptionSync>(stringIterable);44+expectAssignable<StdinOption>([stringIterable]);45+expectAssignable<StdinOptionSync>([stringIterable]);46+47+expectNotAssignable<StdoutStderrOption>(stringIterable);48+expectNotAssignable<StdoutStderrOptionSync>(stringIterable);49+expectNotAssignable<StdoutStderrOption>([stringIterable]);50+expectNotAssignable<StdoutStderrOptionSync>([stringIterable]);51+52+expectAssignable<StdioOption>(stringIterable);53+expectAssignable<StdioOptionSync>(stringIterable);54+expectAssignable<StdioOption>([stringIterable]);55+expectAssignable<StdioOptionSync>([stringIterable]);added:test-d/stdio/option/null.test-d.ts+49 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+expectError(await execa('unicorns', {stdin: null}));14+expectError(execaSync('unicorns', {stdin: null}));15+expectError(await execa('unicorns', {stdin: [null]}));16+expectError(execaSync('unicorns', {stdin: [null]}));17+18+expectError(await execa('unicorns', {stdout: null}));19+expectError(execaSync('unicorns', {stdout: null}));20+expectError(await execa('unicorns', {stdout: [null]}));21+expectError(execaSync('unicorns', {stdout: [null]}));22+23+expectError(await execa('unicorns', {stderr: null}));24+expectError(execaSync('unicorns', {stderr: null}));25+expectError(await execa('unicorns', {stderr: [null]}));26+expectError(execaSync('unicorns', {stderr: [null]}));27+28+expectError(await execa('unicorns', {stdio: null}));29+expectError(execaSync('unicorns', {stdio: null}));30+31+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', null]}));32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', null]}));33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [null]]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [null]]}));35+36+expectNotAssignable<StdinOption>(null);37+expectNotAssignable<StdinOptionSync>(null);38+expectNotAssignable<StdinOption>([null]);39+expectNotAssignable<StdinOptionSync>([null]);40+41+expectNotAssignable<StdoutStderrOption>(null);42+expectNotAssignable<StdoutStderrOptionSync>(null);43+expectNotAssignable<StdoutStderrOption>([null]);44+expectNotAssignable<StdoutStderrOptionSync>([null]);45+46+expectNotAssignable<StdioOption>(null);47+expectNotAssignable<StdioOptionSync>(null);48+expectNotAssignable<StdioOption>([null]);49+expectNotAssignable<StdioOptionSync>([null]);added:test-d/stdio/option/overlapped.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: 'overlapped'});14+expectError(execaSync('unicorns', {stdin: 'overlapped'}));15+await execa('unicorns', {stdin: ['overlapped']});16+expectError(execaSync('unicorns', {stdin: ['overlapped']}));17+18+await execa('unicorns', {stdout: 'overlapped'});19+expectError(execaSync('unicorns', {stdout: 'overlapped'}));20+await execa('unicorns', {stdout: ['overlapped']});21+expectError(execaSync('unicorns', {stdout: ['overlapped']}));22+23+await execa('unicorns', {stderr: 'overlapped'});24+expectError(execaSync('unicorns', {stderr: 'overlapped'}));25+await execa('unicorns', {stderr: ['overlapped']});26+expectError(execaSync('unicorns', {stderr: ['overlapped']}));27+28+await execa('unicorns', {stdio: 'overlapped'});29+expectError(execaSync('unicorns', {stdio: 'overlapped'}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'overlapped']});32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'overlapped']}));33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['overlapped']]});34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['overlapped']]}));35+36+expectAssignable<StdinOption>('overlapped');37+expectNotAssignable<StdinOptionSync>('overlapped');38+expectAssignable<StdinOption>(['overlapped']);39+expectNotAssignable<StdinOptionSync>(['overlapped']);40+41+expectAssignable<StdoutStderrOption>('overlapped');42+expectNotAssignable<StdoutStderrOptionSync>('overlapped');43+expectAssignable<StdoutStderrOption>(['overlapped']);44+expectNotAssignable<StdoutStderrOptionSync>(['overlapped']);45+46+expectAssignable<StdioOption>('overlapped');47+expectNotAssignable<StdioOptionSync>('overlapped');48+expectAssignable<StdioOption>(['overlapped']);49+expectNotAssignable<StdioOptionSync>(['overlapped']);added:test-d/stdio/option/pipe-inherit.test-d.ts+34 added
1+import {expectError, expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const pipeInherit = ['pipe', 'inherit'] as const;14+15+await execa('unicorns', {stdin: pipeInherit});16+execaSync('unicorns', {stdin: pipeInherit});17+18+await execa('unicorns', {stdout: pipeInherit});19+execaSync('unicorns', {stdout: pipeInherit});20+21+await execa('unicorns', {stderr: pipeInherit});22+execaSync('unicorns', {stderr: pipeInherit});23+24+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeInherit]}));25+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeInherit]});26+27+expectAssignable<StdinOption>(pipeInherit);28+expectAssignable<StdinOptionSync>(pipeInherit);29+30+expectAssignable<StdoutStderrOption>(pipeInherit);31+expectAssignable<StdoutStderrOptionSync>(pipeInherit);32+33+expectAssignable<StdioOption>(pipeInherit);34+expectAssignable<StdioOptionSync>(pipeInherit);added:test-d/stdio/option/pipe-undefined.test-d.ts+34 added
1+import {expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const pipeUndefined = ['pipe', undefined] as const;14+15+await execa('unicorns', {stdin: pipeUndefined});16+execaSync('unicorns', {stdin: pipeUndefined});17+18+await execa('unicorns', {stdout: pipeUndefined});19+execaSync('unicorns', {stdout: pipeUndefined});20+21+await execa('unicorns', {stderr: pipeUndefined});22+execaSync('unicorns', {stderr: pipeUndefined});23+24+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeUndefined]});25+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeUndefined]});26+27+expectAssignable<StdinOption>(pipeUndefined);28+expectAssignable<StdinOptionSync>(pipeUndefined);29+30+expectAssignable<StdoutStderrOption>(pipeUndefined);31+expectAssignable<StdoutStderrOptionSync>(pipeUndefined);32+33+expectAssignable<StdioOption>(pipeUndefined);34+expectAssignable<StdioOptionSync>(pipeUndefined);added:test-d/stdio/option/pipe.test-d.ts+49 added
1+import {expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: 'pipe'});14+execaSync('unicorns', {stdin: 'pipe'});15+await execa('unicorns', {stdin: ['pipe']});16+execaSync('unicorns', {stdin: ['pipe']});17+18+await execa('unicorns', {stdout: 'pipe'});19+execaSync('unicorns', {stdout: 'pipe'});20+await execa('unicorns', {stdout: ['pipe']});21+execaSync('unicorns', {stdout: ['pipe']});22+23+await execa('unicorns', {stderr: 'pipe'});24+execaSync('unicorns', {stderr: 'pipe'});25+await execa('unicorns', {stderr: ['pipe']});26+execaSync('unicorns', {stderr: ['pipe']});27+28+await execa('unicorns', {stdio: 'pipe'});29+execaSync('unicorns', {stdio: 'pipe'});30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe']]});34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe']]});35+36+expectAssignable<StdinOption>('pipe');37+expectAssignable<StdinOptionSync>('pipe');38+expectAssignable<StdinOption>(['pipe']);39+expectAssignable<StdinOptionSync>(['pipe']);40+41+expectAssignable<StdoutStderrOption>('pipe');42+expectAssignable<StdoutStderrOptionSync>('pipe');43+expectAssignable<StdoutStderrOption>(['pipe']);44+expectAssignable<StdoutStderrOptionSync>(['pipe']);45+46+expectAssignable<StdioOption>('pipe');47+expectAssignable<StdioOptionSync>('pipe');48+expectAssignable<StdioOption>(['pipe']);49+expectAssignable<StdioOptionSync>(['pipe']);added:test-d/stdio/option/process-stderr.test-d.ts+50 added
1+import * as process from 'node:process';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+expectError(await execa('unicorns', {stdin: process.stderr}));15+expectError(execaSync('unicorns', {stdin: process.stderr}));16+expectError(await execa('unicorns', {stdin: [process.stderr]}));17+expectError(execaSync('unicorns', {stdin: [process.stderr]}));18+19+await execa('unicorns', {stdout: process.stderr});20+execaSync('unicorns', {stdout: process.stderr});21+await execa('unicorns', {stdout: [process.stderr]});22+expectError(execaSync('unicorns', {stdout: [process.stderr]}));23+24+await execa('unicorns', {stderr: process.stderr});25+execaSync('unicorns', {stderr: process.stderr});26+await execa('unicorns', {stderr: [process.stderr]});27+expectError(execaSync('unicorns', {stderr: [process.stderr]}));28+29+expectError(await execa('unicorns', {stdio: process.stderr}));30+expectError(execaSync('unicorns', {stdio: process.stderr}));31+32+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', process.stderr]});33+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', process.stderr]});34+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [process.stderr]]});35+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [process.stderr]]}));36+37+expectNotAssignable<StdinOption>(process.stderr);38+expectNotAssignable<StdinOptionSync>(process.stderr);39+expectNotAssignable<StdinOption>([process.stderr]);40+expectNotAssignable<StdinOptionSync>([process.stderr]);41+42+expectAssignable<StdoutStderrOption>(process.stderr);43+expectAssignable<StdoutStderrOptionSync>(process.stderr);44+expectAssignable<StdoutStderrOption>([process.stderr]);45+expectNotAssignable<StdoutStderrOptionSync>([process.stderr]);46+47+expectAssignable<StdioOption>(process.stderr);48+expectAssignable<StdioOptionSync>(process.stderr);49+expectAssignable<StdioOption>([process.stderr]);50+expectNotAssignable<StdioOptionSync>([process.stderr]);added:test-d/stdio/option/process-stdin.test-d.ts+50 added
1+import * as process from 'node:process';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+await execa('unicorns', {stdin: process.stdin});15+execaSync('unicorns', {stdin: process.stdin});16+await execa('unicorns', {stdin: [process.stdin]});17+expectError(execaSync('unicorns', {stdin: [process.stdin]}));18+19+expectError(await execa('unicorns', {stdout: process.stdin}));20+expectError(execaSync('unicorns', {stdout: process.stdin}));21+expectError(await execa('unicorns', {stdout: [process.stdin]}));22+expectError(execaSync('unicorns', {stdout: [process.stdin]}));23+24+expectError(await execa('unicorns', {stderr: process.stdin}));25+expectError(execaSync('unicorns', {stderr: process.stdin}));26+expectError(await execa('unicorns', {stderr: [process.stdin]}));27+expectError(execaSync('unicorns', {stderr: [process.stdin]}));28+29+expectError(await execa('unicorns', {stdio: process.stdin}));30+expectError(execaSync('unicorns', {stdio: process.stdin}));31+32+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', process.stdin]});33+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', process.stdin]});34+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [process.stdin]]});35+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [process.stdin]]}));36+37+expectAssignable<StdinOption>(process.stdin);38+expectAssignable<StdinOptionSync>(process.stdin);39+expectAssignable<StdinOption>([process.stdin]);40+expectNotAssignable<StdinOptionSync>([process.stdin]);41+42+expectNotAssignable<StdoutStderrOption>(process.stdin);43+expectNotAssignable<StdoutStderrOptionSync>(process.stdin);44+expectNotAssignable<StdoutStderrOption>([process.stdin]);45+expectNotAssignable<StdoutStderrOptionSync>([process.stdin]);46+47+expectAssignable<StdioOption>(process.stdin);48+expectAssignable<StdioOptionSync>(process.stdin);49+expectAssignable<StdioOption>([process.stdin]);50+expectNotAssignable<StdioOptionSync>([process.stdin]);added:test-d/stdio/option/process-stdout.test-d.ts+50 added
1+import * as process from 'node:process';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+expectError(await execa('unicorns', {stdin: process.stdout}));15+expectError(execaSync('unicorns', {stdin: process.stdout}));16+expectError(await execa('unicorns', {stdin: [process.stdout]}));17+expectError(execaSync('unicorns', {stdin: [process.stdout]}));18+19+await execa('unicorns', {stdout: process.stdout});20+execaSync('unicorns', {stdout: process.stdout});21+await execa('unicorns', {stdout: [process.stdout]});22+expectError(execaSync('unicorns', {stdout: [process.stdout]}));23+24+await execa('unicorns', {stderr: process.stdout});25+execaSync('unicorns', {stderr: process.stdout});26+await execa('unicorns', {stderr: [process.stdout]});27+expectError(execaSync('unicorns', {stderr: [process.stdout]}));28+29+expectError(await execa('unicorns', {stdio: process.stdout}));30+expectError(execaSync('unicorns', {stdio: process.stdout}));31+32+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', process.stdout]});33+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', process.stdout]});34+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [process.stdout]]});35+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [process.stdout]]}));36+37+expectNotAssignable<StdinOption>(process.stdout);38+expectNotAssignable<StdinOptionSync>(process.stdout);39+expectNotAssignable<StdinOption>([process.stdout]);40+expectNotAssignable<StdinOptionSync>([process.stdout]);41+42+expectAssignable<StdoutStderrOption>(process.stdout);43+expectAssignable<StdoutStderrOptionSync>(process.stdout);44+expectAssignable<StdoutStderrOption>([process.stdout]);45+expectNotAssignable<StdoutStderrOptionSync>([process.stdout]);46+47+expectAssignable<StdioOption>(process.stdout);48+expectAssignable<StdioOptionSync>(process.stdout);49+expectAssignable<StdioOption>([process.stdout]);50+expectNotAssignable<StdioOptionSync>([process.stdout]);added:test-d/stdio/option/readable-stream.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: new ReadableStream()});14+expectError(execaSync('unicorns', {stdin: new ReadableStream()}));15+await execa('unicorns', {stdin: [new ReadableStream()]});16+expectError(execaSync('unicorns', {stdin: [new ReadableStream()]}));17+18+expectError(await execa('unicorns', {stdout: new ReadableStream()}));19+expectError(execaSync('unicorns', {stdout: new ReadableStream()}));20+expectError(await execa('unicorns', {stdout: [new ReadableStream()]}));21+expectError(execaSync('unicorns', {stdout: [new ReadableStream()]}));22+23+expectError(await execa('unicorns', {stderr: new ReadableStream()}));24+expectError(execaSync('unicorns', {stderr: new ReadableStream()}));25+expectError(await execa('unicorns', {stderr: [new ReadableStream()]}));26+expectError(execaSync('unicorns', {stderr: [new ReadableStream()]}));27+28+expectError(await execa('unicorns', {stdio: new ReadableStream()}));29+expectError(execaSync('unicorns', {stdio: new ReadableStream()}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new ReadableStream()]});32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new ReadableStream()]}));33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new ReadableStream()]]});34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new ReadableStream()]]}));35+36+expectAssignable<StdinOption>(new ReadableStream());37+expectNotAssignable<StdinOptionSync>(new ReadableStream());38+expectAssignable<StdinOption>([new ReadableStream()]);39+expectNotAssignable<StdinOptionSync>([new ReadableStream()]);40+41+expectNotAssignable<StdoutStderrOption>(new ReadableStream());42+expectNotAssignable<StdoutStderrOptionSync>(new ReadableStream());43+expectNotAssignable<StdoutStderrOption>([new ReadableStream()]);44+expectNotAssignable<StdoutStderrOptionSync>([new ReadableStream()]);45+46+expectAssignable<StdioOption>(new ReadableStream());47+expectNotAssignable<StdioOptionSync>(new ReadableStream());48+expectAssignable<StdioOption>([new ReadableStream()]);49+expectNotAssignable<StdioOptionSync>([new ReadableStream()]);added:test-d/stdio/option/readable.test-d.ts+50 added
1+import {Readable} from 'node:stream';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+await execa('unicorns', {stdin: new Readable()});15+execaSync('unicorns', {stdin: new Readable()});16+await execa('unicorns', {stdin: [new Readable()]});17+expectError(execaSync('unicorns', {stdin: [new Readable()]}));18+19+expectError(await execa('unicorns', {stdout: new Readable()}));20+expectError(execaSync('unicorns', {stdout: new Readable()}));21+expectError(await execa('unicorns', {stdout: [new Readable()]}));22+expectError(execaSync('unicorns', {stdout: [new Readable()]}));23+24+expectError(await execa('unicorns', {stderr: new Readable()}));25+expectError(execaSync('unicorns', {stderr: new Readable()}));26+expectError(await execa('unicorns', {stderr: [new Readable()]}));27+expectError(execaSync('unicorns', {stderr: [new Readable()]}));28+29+expectError(await execa('unicorns', {stdio: new Readable()}));30+expectError(execaSync('unicorns', {stdio: new Readable()}));31+32+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Readable()]});33+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Readable()]});34+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Readable()]]});35+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Readable()]]}));36+37+expectAssignable<StdinOption>(new Readable());38+expectAssignable<StdinOptionSync>(new Readable());39+expectAssignable<StdinOption>([new Readable()]);40+expectNotAssignable<StdinOptionSync>([new Readable()]);41+42+expectNotAssignable<StdoutStderrOption>(new Readable());43+expectNotAssignable<StdoutStderrOptionSync>(new Readable());44+expectNotAssignable<StdoutStderrOption>([new Readable()]);45+expectNotAssignable<StdoutStderrOptionSync>([new Readable()]);46+47+expectAssignable<StdioOption>(new Readable());48+expectAssignable<StdioOptionSync>(new Readable());49+expectAssignable<StdioOption>([new Readable()]);50+expectNotAssignable<StdioOptionSync>([new Readable()]);added:test-d/stdio/option/uint-array.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: new Uint8Array()});14+execaSync('unicorns', {stdin: new Uint8Array()});15+await execa('unicorns', {stdin: [new Uint8Array()]});16+execaSync('unicorns', {stdin: [new Uint8Array()]});17+18+expectError(await execa('unicorns', {stdout: new Uint8Array()}));19+expectError(execaSync('unicorns', {stdout: new Uint8Array()}));20+expectError(await execa('unicorns', {stdout: [new Uint8Array()]}));21+expectError(execaSync('unicorns', {stdout: [new Uint8Array()]}));22+23+expectError(await execa('unicorns', {stderr: new Uint8Array()}));24+expectError(execaSync('unicorns', {stderr: new Uint8Array()}));25+expectError(await execa('unicorns', {stderr: [new Uint8Array()]}));26+expectError(execaSync('unicorns', {stderr: [new Uint8Array()]}));27+28+expectError(await execa('unicorns', {stdio: new Uint8Array()}));29+expectError(execaSync('unicorns', {stdio: new Uint8Array()}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Uint8Array()]});32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Uint8Array()]}));33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Uint8Array()]]});34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Uint8Array()]]}));35+36+expectAssignable<StdinOption>(new Uint8Array());37+expectAssignable<StdinOptionSync>(new Uint8Array());38+expectAssignable<StdinOption>([new Uint8Array()]);39+expectAssignable<StdinOptionSync>([new Uint8Array()]);40+41+expectNotAssignable<StdoutStderrOption>(new Uint8Array());42+expectNotAssignable<StdoutStderrOptionSync>(new Uint8Array());43+expectNotAssignable<StdoutStderrOption>([new Uint8Array()]);44+expectNotAssignable<StdoutStderrOptionSync>([new Uint8Array()]);45+46+expectAssignable<StdioOption>(new Uint8Array());47+expectAssignable<StdioOptionSync>(new Uint8Array());48+expectAssignable<StdioOption>([new Uint8Array()]);49+expectAssignable<StdioOptionSync>([new Uint8Array()]);added:test-d/stdio/option/undefined.test-d.ts+49 added
1+import {expectAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+await execa('unicorns', {stdin: undefined});14+execaSync('unicorns', {stdin: undefined});15+await execa('unicorns', {stdin: [undefined]});16+execaSync('unicorns', {stdin: [undefined]});17+18+await execa('unicorns', {stdout: undefined});19+execaSync('unicorns', {stdout: undefined});20+await execa('unicorns', {stdout: [undefined]});21+execaSync('unicorns', {stdout: [undefined]});22+23+await execa('unicorns', {stderr: undefined});24+execaSync('unicorns', {stderr: undefined});25+await execa('unicorns', {stderr: [undefined]});26+execaSync('unicorns', {stderr: [undefined]});27+28+await execa('unicorns', {stdio: undefined});29+execaSync('unicorns', {stdio: undefined});30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});32+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined]]});34+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined]]});35+36+expectAssignable<StdinOption>(undefined);37+expectAssignable<StdinOptionSync>(undefined);38+expectAssignable<StdinOption>([undefined]);39+expectAssignable<StdinOptionSync>([undefined]);40+41+expectAssignable<StdoutStderrOption>(undefined);42+expectAssignable<StdoutStderrOptionSync>(undefined);43+expectAssignable<StdoutStderrOption>([undefined]);44+expectAssignable<StdoutStderrOptionSync>([undefined]);45+46+expectAssignable<StdioOption>(undefined);47+expectAssignable<StdioOptionSync>(undefined);48+expectAssignable<StdioOption>([undefined]);49+expectAssignable<StdioOptionSync>([undefined]);added:test-d/stdio/option/unknown.test-d.ts+50 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+expectError(await execa('unicorns', {stdin: 'unknown'}));14+expectError(execaSync('unicorns', {stdin: 'unknown'}));15+expectError(await execa('unicorns', {stdin: ['unknown']}));16+expectError(execaSync('unicorns', {stdin: ['unknown']}));17+18+expectError(await execa('unicorns', {stdout: 'unknown'}));19+expectError(execaSync('unicorns', {stdout: 'unknown'}));20+expectError(await execa('unicorns', {stdout: ['unknown']}));21+expectError(execaSync('unicorns', {stdout: ['unknown']}));22+23+expectError(await execa('unicorns', {stderr: 'unknown'}));24+expectError(execaSync('unicorns', {stderr: 'unknown'}));25+expectError(await execa('unicorns', {stderr: ['unknown']}));26+expectError(execaSync('unicorns', {stderr: ['unknown']}));27+28+expectError(await execa('unicorns', {stdio: 'unknown'}));29+expectError(execaSync('unicorns', {stdio: 'unknown'}));30+31+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'unknown']}));32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'unknown']}));33+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['unknown']]}));34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['unknown']]}));35+36+expectNotAssignable<StdinOption>('unknown');37+expectNotAssignable<StdinOptionSync>('unknown');38+expectNotAssignable<StdinOption>(['unknown']);39+expectNotAssignable<StdinOptionSync>(['unknown']);40+41+expectNotAssignable<StdoutStderrOption>('unknown');42+expectNotAssignable<StdoutStderrOptionSync>('unknown');43+expectNotAssignable<StdoutStderrOption>(['unknown']);44+expectNotAssignable<StdoutStderrOptionSync>(['unknown']);45+46+expectNotAssignable<StdioOption>('unknown');47+expectNotAssignable<StdioOptionSync>('unknown');48+expectNotAssignable<StdioOption>(['unknown']);49+expectNotAssignable<StdioOptionSync>(['unknown']);50+added:test-d/stdio/option/web-transform-instance.test-d.ts+51 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const webTransformInstance = new TransformStream();14+15+await execa('unicorns', {stdin: webTransformInstance});16+expectError(execaSync('unicorns', {stdin: webTransformInstance}));17+await execa('unicorns', {stdin: [webTransformInstance]});18+expectError(execaSync('unicorns', {stdin: [webTransformInstance]}));19+20+await execa('unicorns', {stdout: webTransformInstance});21+expectError(execaSync('unicorns', {stdout: webTransformInstance}));22+await execa('unicorns', {stdout: [webTransformInstance]});23+expectError(execaSync('unicorns', {stdout: [webTransformInstance]}));24+25+await execa('unicorns', {stderr: webTransformInstance});26+expectError(execaSync('unicorns', {stderr: webTransformInstance}));27+await execa('unicorns', {stderr: [webTransformInstance]});28+expectError(execaSync('unicorns', {stderr: [webTransformInstance]}));29+30+expectError(await execa('unicorns', {stdio: webTransformInstance}));31+expectError(execaSync('unicorns', {stdio: webTransformInstance}));32+33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformInstance]});34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformInstance]}));35+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformInstance]]});36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformInstance]]}));37+38+expectAssignable<StdinOption>(webTransformInstance);39+expectNotAssignable<StdinOptionSync>(webTransformInstance);40+expectAssignable<StdinOption>([webTransformInstance]);41+expectNotAssignable<StdinOptionSync>([webTransformInstance]);42+43+expectAssignable<StdoutStderrOption>(webTransformInstance);44+expectNotAssignable<StdoutStderrOptionSync>(webTransformInstance);45+expectAssignable<StdoutStderrOption>([webTransformInstance]);46+expectNotAssignable<StdoutStderrOptionSync>([webTransformInstance]);47+48+expectAssignable<StdioOption>(webTransformInstance);49+expectNotAssignable<StdioOptionSync>(webTransformInstance);50+expectAssignable<StdioOption>([webTransformInstance]);51+expectNotAssignable<StdioOptionSync>([webTransformInstance]);added:test-d/stdio/option/web-transform-invalid.test-d.ts+54 added
1+import {expectError, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const webTransformWithInvalidObjectMode = {14+ transform: new TransformStream(),15+ objectMode: 'true',16+} as const;17+18+expectError(await execa('unicorns', {stdin: webTransformWithInvalidObjectMode}));19+expectError(execaSync('unicorns', {stdin: webTransformWithInvalidObjectMode}));20+expectError(await execa('unicorns', {stdin: [webTransformWithInvalidObjectMode]}));21+expectError(execaSync('unicorns', {stdin: [webTransformWithInvalidObjectMode]}));22+23+expectError(await execa('unicorns', {stdout: webTransformWithInvalidObjectMode}));24+expectError(execaSync('unicorns', {stdout: webTransformWithInvalidObjectMode}));25+expectError(await execa('unicorns', {stdout: [webTransformWithInvalidObjectMode]}));26+expectError(execaSync('unicorns', {stdout: [webTransformWithInvalidObjectMode]}));27+28+expectError(await execa('unicorns', {stderr: webTransformWithInvalidObjectMode}));29+expectError(execaSync('unicorns', {stderr: webTransformWithInvalidObjectMode}));30+expectError(await execa('unicorns', {stderr: [webTransformWithInvalidObjectMode]}));31+expectError(execaSync('unicorns', {stderr: [webTransformWithInvalidObjectMode]}));32+33+expectError(await execa('unicorns', {stdio: webTransformWithInvalidObjectMode}));34+expectError(execaSync('unicorns', {stdio: webTransformWithInvalidObjectMode}));35+36+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformWithInvalidObjectMode]}));37+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformWithInvalidObjectMode]}));38+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformWithInvalidObjectMode]]}));39+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformWithInvalidObjectMode]]}));40+41+expectNotAssignable<StdinOption>(webTransformWithInvalidObjectMode);42+expectNotAssignable<StdinOptionSync>(webTransformWithInvalidObjectMode);43+expectNotAssignable<StdinOption>([webTransformWithInvalidObjectMode]);44+expectNotAssignable<StdinOptionSync>([webTransformWithInvalidObjectMode]);45+46+expectNotAssignable<StdoutStderrOption>(webTransformWithInvalidObjectMode);47+expectNotAssignable<StdoutStderrOptionSync>(webTransformWithInvalidObjectMode);48+expectNotAssignable<StdoutStderrOption>([webTransformWithInvalidObjectMode]);49+expectNotAssignable<StdoutStderrOptionSync>([webTransformWithInvalidObjectMode]);50+51+expectNotAssignable<StdioOption>(webTransformWithInvalidObjectMode);52+expectNotAssignable<StdioOptionSync>(webTransformWithInvalidObjectMode);53+expectNotAssignable<StdioOption>([webTransformWithInvalidObjectMode]);54+expectNotAssignable<StdioOptionSync>([webTransformWithInvalidObjectMode]);added:test-d/stdio/option/web-transform-object.test-d.ts+54 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const webTransformObject = {14+ transform: new TransformStream(),15+ objectMode: true as const,16+} as const;17+18+await execa('unicorns', {stdin: webTransformObject});19+expectError(execaSync('unicorns', {stdin: webTransformObject}));20+await execa('unicorns', {stdin: [webTransformObject]});21+expectError(execaSync('unicorns', {stdin: [webTransformObject]}));22+23+await execa('unicorns', {stdout: webTransformObject});24+expectError(execaSync('unicorns', {stdout: webTransformObject}));25+await execa('unicorns', {stdout: [webTransformObject]});26+expectError(execaSync('unicorns', {stdout: [webTransformObject]}));27+28+await execa('unicorns', {stderr: webTransformObject});29+expectError(execaSync('unicorns', {stderr: webTransformObject}));30+await execa('unicorns', {stderr: [webTransformObject]});31+expectError(execaSync('unicorns', {stderr: [webTransformObject]}));32+33+expectError(await execa('unicorns', {stdio: webTransformObject}));34+expectError(execaSync('unicorns', {stdio: webTransformObject}));35+36+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformObject]});37+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformObject]}));38+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformObject]]});39+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformObject]]}));40+41+expectAssignable<StdinOption>(webTransformObject);42+expectNotAssignable<StdinOptionSync>(webTransformObject);43+expectAssignable<StdinOption>([webTransformObject]);44+expectNotAssignable<StdinOptionSync>([webTransformObject]);45+46+expectAssignable<StdoutStderrOption>(webTransformObject);47+expectNotAssignable<StdoutStderrOptionSync>(webTransformObject);48+expectAssignable<StdoutStderrOption>([webTransformObject]);49+expectNotAssignable<StdoutStderrOptionSync>([webTransformObject]);50+51+expectAssignable<StdioOption>(webTransformObject);52+expectNotAssignable<StdioOptionSync>(webTransformObject);53+expectAssignable<StdioOption>([webTransformObject]);54+expectNotAssignable<StdioOptionSync>([webTransformObject]);added:test-d/stdio/option/web-transform.test-d.ts+51 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+const webTransform = {transform: new TransformStream()} as const;14+15+await execa('unicorns', {stdin: webTransform});16+expectError(execaSync('unicorns', {stdin: webTransform}));17+await execa('unicorns', {stdin: [webTransform]});18+expectError(execaSync('unicorns', {stdin: [webTransform]}));19+20+await execa('unicorns', {stdout: webTransform});21+expectError(execaSync('unicorns', {stdout: webTransform}));22+await execa('unicorns', {stdout: [webTransform]});23+expectError(execaSync('unicorns', {stdout: [webTransform]}));24+25+await execa('unicorns', {stderr: webTransform});26+expectError(execaSync('unicorns', {stderr: webTransform}));27+await execa('unicorns', {stderr: [webTransform]});28+expectError(execaSync('unicorns', {stderr: [webTransform]}));29+30+expectError(await execa('unicorns', {stdio: webTransform}));31+expectError(execaSync('unicorns', {stdio: webTransform}));32+33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransform]});34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransform]}));35+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransform]]});36+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransform]]}));37+38+expectAssignable<StdinOption>(webTransform);39+expectNotAssignable<StdinOptionSync>(webTransform);40+expectAssignable<StdinOption>([webTransform]);41+expectNotAssignable<StdinOptionSync>([webTransform]);42+43+expectAssignable<StdoutStderrOption>(webTransform);44+expectNotAssignable<StdoutStderrOptionSync>(webTransform);45+expectAssignable<StdoutStderrOption>([webTransform]);46+expectNotAssignable<StdoutStderrOptionSync>([webTransform]);47+48+expectAssignable<StdioOption>(webTransform);49+expectNotAssignable<StdioOptionSync>(webTransform);50+expectAssignable<StdioOption>([webTransform]);51+expectNotAssignable<StdioOptionSync>([webTransform]);added:test-d/stdio/option/writable-stream.test-d.ts+49 added
1+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';2+import {3+ execa,4+ execaSync,5+ type StdinOption,6+ type StdinOptionSync,7+ type StdoutStderrOption,8+ type StdoutStderrOptionSync,9+ type StdioOption,10+ type StdioOptionSync,11+} from '../../../index.js';12+13+expectError(await execa('unicorns', {stdin: new WritableStream()}));14+expectError(execaSync('unicorns', {stdin: new WritableStream()}));15+expectError(await execa('unicorns', {stdin: [new WritableStream()]}));16+expectError(execaSync('unicorns', {stdin: [new WritableStream()]}));17+18+await execa('unicorns', {stdout: new WritableStream()});19+expectError(execaSync('unicorns', {stdout: new WritableStream()}));20+await execa('unicorns', {stdout: [new WritableStream()]});21+expectError(execaSync('unicorns', {stdout: [new WritableStream()]}));22+23+await execa('unicorns', {stderr: new WritableStream()});24+expectError(execaSync('unicorns', {stderr: new WritableStream()}));25+await execa('unicorns', {stderr: [new WritableStream()]});26+expectError(execaSync('unicorns', {stderr: [new WritableStream()]}));27+28+expectError(await execa('unicorns', {stdio: new WritableStream()}));29+expectError(execaSync('unicorns', {stdio: new WritableStream()}));30+31+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new WritableStream()]});32+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new WritableStream()]}));33+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new WritableStream()]]});34+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new WritableStream()]]}));35+36+expectNotAssignable<StdinOption>(new WritableStream());37+expectNotAssignable<StdinOptionSync>(new WritableStream());38+expectNotAssignable<StdinOption>([new WritableStream()]);39+expectNotAssignable<StdinOptionSync>([new WritableStream()]);40+41+expectAssignable<StdoutStderrOption>(new WritableStream());42+expectNotAssignable<StdoutStderrOptionSync>(new WritableStream());43+expectAssignable<StdoutStderrOption>([new WritableStream()]);44+expectNotAssignable<StdoutStderrOptionSync>([new WritableStream()]);45+46+expectAssignable<StdioOption>(new WritableStream());47+expectNotAssignable<StdioOptionSync>(new WritableStream());48+expectAssignable<StdioOption>([new WritableStream()]);49+expectNotAssignable<StdioOptionSync>([new WritableStream()]);added:test-d/stdio/option/writable.test-d.ts+50 added
1+import {Writable} from 'node:stream';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {4+ execa,5+ execaSync,6+ type StdinOption,7+ type StdinOptionSync,8+ type StdoutStderrOption,9+ type StdoutStderrOptionSync,10+ type StdioOption,11+ type StdioOptionSync,12+} from '../../../index.js';13+14+expectError(await execa('unicorns', {stdin: new Writable()}));15+expectError(execaSync('unicorns', {stdin: new Writable()}));16+expectError(await execa('unicorns', {stdin: [new Writable()]}));17+expectError(execaSync('unicorns', {stdin: [new Writable()]}));18+19+await execa('unicorns', {stdout: new Writable()});20+execaSync('unicorns', {stdout: new Writable()});21+await execa('unicorns', {stdout: [new Writable()]});22+expectError(execaSync('unicorns', {stdout: [new Writable()]}));23+24+await execa('unicorns', {stderr: new Writable()});25+execaSync('unicorns', {stderr: new Writable()});26+await execa('unicorns', {stderr: [new Writable()]});27+expectError(execaSync('unicorns', {stderr: [new Writable()]}));28+29+expectError(await execa('unicorns', {stdio: new Writable()}));30+expectError(execaSync('unicorns', {stdio: new Writable()}));31+32+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Writable()]});33+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Writable()]});34+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Writable()]]});35+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Writable()]]}));36+37+expectNotAssignable<StdinOption>(new Writable());38+expectNotAssignable<StdinOptionSync>(new Writable());39+expectNotAssignable<StdinOption>([new Writable()]);40+expectNotAssignable<StdinOptionSync>([new Writable()]);41+42+expectAssignable<StdoutStderrOption>(new Writable());43+expectAssignable<StdoutStderrOptionSync>(new Writable());44+expectAssignable<StdoutStderrOption>([new Writable()]);45+expectNotAssignable<StdoutStderrOptionSync>([new Writable()]);46+47+expectAssignable<StdioOption>(new Writable());48+expectAssignable<StdioOptionSync>(new Writable());49+expectAssignable<StdioOption>([new Writable()]);50+expectNotAssignable<StdioOptionSync>([new Writable()]);added:test-d/stdio/array.test-d.ts+14 added
1+import {expectError} from 'tsd';2+import {execa, execaSync} from '../../index.js';3+4+expectError(await execa('unicorns', {stdio: []}));5+expectError(execaSync('unicorns', {stdio: []}));6+expectError(await execa('unicorns', {stdio: ['pipe']}));7+expectError(execaSync('unicorns', {stdio: ['pipe']}));8+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe']}));9+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe']}));10+11+await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'pipe']});12+execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'pipe']});13+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'unknown']}));14+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'unknown']}));added:test-d/stdio/direction.test-d.ts+34 added
1+import {Readable, Writable} from 'node:stream';2+import {expectError, expectAssignable, expectNotAssignable} from 'tsd';3+import {execa, execaSync, type StdioOption, type StdioOptionSync} from '../../index.js';4+5+await execa('unicorns', {stdio: [new Readable(), 'pipe', 'pipe']});6+execaSync('unicorns', {stdio: [new Readable(), 'pipe', 'pipe']});7+await execa('unicorns', {stdio: [[new Readable()], ['pipe'], ['pipe']]});8+expectError(execaSync('unicorns', {stdio: [[new Readable()], ['pipe'], ['pipe']]}));9+await execa('unicorns', {stdio: ['pipe', new Writable(), 'pipe']});10+execaSync('unicorns', {stdio: ['pipe', new Writable(), 'pipe']});11+await execa('unicorns', {stdio: [['pipe'], [new Writable()], ['pipe']]});12+expectError(execaSync('unicorns', {stdio: [['pipe'], [new Writable()], ['pipe']]}));13+await execa('unicorns', {stdio: ['pipe', 'pipe', new Writable()]});14+execaSync('unicorns', {stdio: ['pipe', 'pipe', new Writable()]});15+await execa('unicorns', {stdio: [['pipe'], ['pipe'], [new Writable()]]});16+expectError(execaSync('unicorns', {stdio: [['pipe'], ['pipe'], [new Writable()]]}));17+18+expectError(await execa('unicorns', {stdio: [new Writable(), 'pipe', 'pipe']}));19+expectError(execaSync('unicorns', {stdio: [new Writable(), 'pipe', 'pipe']}));20+expectError(await execa('unicorns', {stdio: [[new Writable()], ['pipe'], ['pipe']]}));21+expectError(execaSync('unicorns', {stdio: [[new Writable()], ['pipe'], ['pipe']]}));22+expectError(await execa('unicorns', {stdio: ['pipe', new Readable(), 'pipe']}));23+expectError(execaSync('unicorns', {stdio: ['pipe', new Readable(), 'pipe']}));24+expectError(await execa('unicorns', {stdio: [['pipe'], [new Readable()], ['pipe']]}));25+expectError(execaSync('unicorns', {stdio: [['pipe'], [new Readable()], ['pipe']]}));26+expectError(await execa('unicorns', {stdio: ['pipe', 'pipe', new Readable()]}));27+expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', new Readable()]}));28+expectError(await execa('unicorns', {stdio: [['pipe'], ['pipe'], [new Readable()]]}));29+expectError(execaSync('unicorns', {stdio: [['pipe'], ['pipe'], [new Readable()]]}));30+31+expectAssignable<StdioOption>([new Uint8Array(), new Uint8Array()]);32+expectAssignable<StdioOptionSync>([new Uint8Array(), new Uint8Array()]);33+expectNotAssignable<StdioOption>([new Writable(), new Uint8Array()]);34+expectNotAssignable<StdioOptionSync>([new Writable(), new Uint8Array()]);added:test-d/subprocess/all.test-d.ts+9 added
1+import type {Readable} from 'node:stream';2+import {expectType} from 'tsd';3+import {execa} from '../../index.js';4+5+const allPromise = execa('unicorns', {all: true});6+expectType<Readable>(allPromise.all);7+8+const noAllPromise = execa('unicorns');9+expectType<undefined>(noAllPromise.all);added:test-d/subprocess/stdio.test-d.ts+41 added
1+import type {Readable, Writable} from 'node:stream';2+import {expectType, expectError} from 'tsd';3+import {execa, type ExecaSubprocess} from '../../index.js';4+5+expectType<Writable | null>({} as ExecaSubprocess['stdin']);6+expectType<Readable | null>({} as ExecaSubprocess['stdout']);7+expectType<Readable | null>({} as ExecaSubprocess['stderr']);8+expectType<Readable | undefined>({} as ExecaSubprocess['all']);9+10+const execaBufferPromise = execa('unicorns', {encoding: 'buffer', all: true});11+expectType<Writable>(execaBufferPromise.stdin);12+expectType<Writable>(execaBufferPromise.stdio[0]);13+expectType<Readable>(execaBufferPromise.stdout);14+expectType<Readable>(execaBufferPromise.stdio[1]);15+expectType<Readable>(execaBufferPromise.stderr);16+expectType<Readable>(execaBufferPromise.stdio[2]);17+expectType<Readable>(execaBufferPromise.all);18+expectError(execaBufferPromise.stdio[3].destroy());19+20+const execaHexPromise = execa('unicorns', {encoding: 'hex', all: true});21+expectType<Writable>(execaHexPromise.stdin);22+expectType<Writable>(execaHexPromise.stdio[0]);23+expectType<Readable>(execaHexPromise.stdout);24+expectType<Readable>(execaHexPromise.stdio[1]);25+expectType<Readable>(execaHexPromise.stderr);26+expectType<Readable>(execaHexPromise.stdio[2]);27+expectType<Readable>(execaHexPromise.all);28+expectError(execaHexPromise.stdio[3].destroy());29+30+const multipleStdinPromise = execa('unicorns', {stdin: ['inherit', 'pipe']});31+expectType<Writable>(multipleStdinPromise.stdin);32+33+const multipleStdoutPromise = execa('unicorns', {stdout: ['inherit', 'pipe'] as ['inherit', 'pipe'], all: true});34+expectType<Writable>(multipleStdoutPromise.stdin);35+expectType<Writable>(multipleStdoutPromise.stdio[0]);36+expectType<Readable>(multipleStdoutPromise.stdout);37+expectType<Readable>(multipleStdoutPromise.stdio[1]);38+expectType<Readable>(multipleStdoutPromise.stderr);39+expectType<Readable>(multipleStdoutPromise.stdio[2]);40+expectType<Readable>(multipleStdoutPromise.all);41+expectError(multipleStdoutPromise.stdio[3].destroy());added:test-d/subprocess/subprocess.test-d.ts+30 added
1+import {expectType, expectError} from 'tsd';2+import {execa} from '../../index.js';3+4+const execaPromise = execa('unicorns');5+6+expectType<number | undefined>(execaPromise.pid);7+8+expectType<boolean>(execa('unicorns').kill());9+execa('unicorns').kill('SIGKILL');10+execa('unicorns').kill(undefined);11+execa('unicorns').kill(new Error('test'));12+execa('unicorns').kill('SIGKILL', new Error('test'));13+execa('unicorns').kill(undefined, new Error('test'));14+expectError(execa('unicorns').kill(null));15+expectError(execa('unicorns').kill(0n));16+expectError(execa('unicorns').kill([new Error('test')]));17+expectError(execa('unicorns').kill({message: 'test'}));18+expectError(execa('unicorns').kill(undefined, {}));19+expectError(execa('unicorns').kill('SIGKILL', {}));20+expectError(execa('unicorns').kill(null, new Error('test')));21+22+expectType<boolean>(execa('unicorns', {ipc: true}).send({}));23+execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']}).send({});24+execa('unicorns', {stdio: ['pipe', 'pipe', 'ipc', 'pipe']}).send({});25+execa('unicorns', {ipc: true}).send('message');26+execa('unicorns', {ipc: true}).send({}, undefined, {keepOpen: true});27+expectError(execa('unicorns', {ipc: true}).send({}, true));28+expectType<undefined>(execa('unicorns', {}).send);29+expectType<undefined>(execa('unicorns', {ipc: false}).send);30+expectType<undefined>(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']}).send);added:test-d/transform/object-mode.test-d.ts+223 added
1+import {Duplex} from 'node:stream';2+import {expectType} from 'tsd';3+import {execa, type ExecaError} from '../../index.js';4+5+const duplexStream = new Duplex();6+const duplex = {transform: duplexStream} as const;7+const duplexObject = {transform: duplexStream as Duplex & {readonly readableObjectMode: true}} as const;8+const duplexNotObject = {transform: duplexStream as Duplex & {readonly readableObjectMode: false}} as const;9+const duplexObjectProperty = {transform: duplexStream, objectMode: true as const} as const;10+const duplexNotObjectProperty = {transform: duplexStream, objectMode: false as const} as const;11+12+const webTransformInstance = new TransformStream();13+const webTransform = {transform: webTransformInstance} as const;14+const webTransformObject = {transform: webTransformInstance, objectMode: true as const} as const;15+const webTransformNotObject = {transform: webTransformInstance, objectMode: false as const} as const;16+17+const objectGenerator = function * (line: unknown) {18+ yield JSON.parse(line as string) as object;19+};20+21+const objectFinal = function * () {22+ yield {};23+};24+25+const objectTransformLinesStdoutResult = await execa('unicorns', {lines: true, stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}});26+expectType<unknown[]>(objectTransformLinesStdoutResult.stdout);27+expectType<[undefined, unknown[], string[]]>(objectTransformLinesStdoutResult.stdio);28+29+const objectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransformObject});30+expectType<unknown[]>(objectWebTransformStdoutResult.stdout);31+expectType<[undefined, unknown[], string]>(objectWebTransformStdoutResult.stdio);32+33+const objectDuplexStdoutResult = await execa('unicorns', {stdout: duplexObject});34+expectType<unknown[]>(objectDuplexStdoutResult.stdout);35+expectType<[undefined, unknown[], string]>(objectDuplexStdoutResult.stdio);36+37+const objectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: duplexObjectProperty});38+expectType<unknown[]>(objectDuplexPropertyStdoutResult.stdout);39+expectType<[undefined, unknown[], string]>(objectDuplexPropertyStdoutResult.stdio);40+41+const objectTransformStdoutResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}});42+expectType<unknown[]>(objectTransformStdoutResult.stdout);43+expectType<[undefined, unknown[], string]>(objectTransformStdoutResult.stdio);44+45+const objectWebTransformStderrResult = await execa('unicorns', {stderr: webTransformObject});46+expectType<unknown[]>(objectWebTransformStderrResult.stderr);47+expectType<[undefined, string, unknown[]]>(objectWebTransformStderrResult.stdio);48+49+const objectDuplexStderrResult = await execa('unicorns', {stderr: duplexObject});50+expectType<unknown[]>(objectDuplexStderrResult.stderr);51+expectType<[undefined, string, unknown[]]>(objectDuplexStderrResult.stdio);52+53+const objectDuplexPropertyStderrResult = await execa('unicorns', {stderr: duplexObjectProperty});54+expectType<unknown[]>(objectDuplexPropertyStderrResult.stderr);55+expectType<[undefined, string, unknown[]]>(objectDuplexPropertyStderrResult.stdio);56+57+const objectTransformStderrResult = await execa('unicorns', {stderr: {transform: objectGenerator, final: objectFinal, objectMode: true}});58+expectType<unknown[]>(objectTransformStderrResult.stderr);59+expectType<[undefined, string, unknown[]]>(objectTransformStderrResult.stdio);60+61+const objectWebTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', webTransformObject]});62+expectType<unknown[]>(objectWebTransformStdioResult.stderr);63+expectType<[undefined, string, unknown[]]>(objectWebTransformStdioResult.stdio);64+65+const objectDuplexStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexObject]});66+expectType<unknown[]>(objectDuplexStdioResult.stderr);67+expectType<[undefined, string, unknown[]]>(objectDuplexStdioResult.stdio);68+69+const objectDuplexPropertyStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexObjectProperty]});70+expectType<unknown[]>(objectDuplexPropertyStdioResult.stderr);71+expectType<[undefined, string, unknown[]]>(objectDuplexPropertyStdioResult.stdio);72+73+const objectTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', {transform: objectGenerator, final: objectFinal, objectMode: true}]});74+expectType<unknown[]>(objectTransformStdioResult.stderr);75+expectType<[undefined, string, unknown[]]>(objectTransformStdioResult.stdio);76+77+const singleObjectWebTransformStdoutResult = await execa('unicorns', {stdout: [webTransformObject]});78+expectType<unknown[]>(singleObjectWebTransformStdoutResult.stdout);79+expectType<[undefined, unknown[], string]>(singleObjectWebTransformStdoutResult.stdio);80+81+const singleObjectDuplexStdoutResult = await execa('unicorns', {stdout: [duplexObject]});82+expectType<unknown[]>(singleObjectDuplexStdoutResult.stdout);83+expectType<[undefined, unknown[], string]>(singleObjectDuplexStdoutResult.stdio);84+85+const singleObjectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: [duplexObjectProperty]});86+expectType<unknown[]>(singleObjectDuplexPropertyStdoutResult.stdout);87+expectType<[undefined, unknown[], string]>(singleObjectDuplexPropertyStdoutResult.stdio);88+89+const singleObjectTransformStdoutResult = await execa('unicorns', {stdout: [{transform: objectGenerator, final: objectFinal, objectMode: true}]});90+expectType<unknown[]>(singleObjectTransformStdoutResult.stdout);91+expectType<[undefined, unknown[], string]>(singleObjectTransformStdoutResult.stdio);92+93+const manyObjectWebTransformStdoutResult = await execa('unicorns', {stdout: [webTransformObject, webTransformObject]});94+expectType<unknown[]>(manyObjectWebTransformStdoutResult.stdout);95+expectType<[undefined, unknown[], string]>(manyObjectWebTransformStdoutResult.stdio);96+97+const manyObjectDuplexStdoutResult = await execa('unicorns', {stdout: [duplexObject, duplexObject]});98+expectType<unknown[]>(manyObjectDuplexStdoutResult.stdout);99+expectType<[undefined, unknown[], string]>(manyObjectDuplexStdoutResult.stdio);100+101+const manyObjectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: [duplexObjectProperty, duplexObjectProperty]});102+expectType<unknown[]>(manyObjectDuplexPropertyStdoutResult.stdout);103+expectType<[undefined, unknown[], string]>(manyObjectDuplexPropertyStdoutResult.stdio);104+105+const manyObjectTransformStdoutResult = await execa('unicorns', {stdout: [{transform: objectGenerator, final: objectFinal, objectMode: true}, {transform: objectGenerator, final: objectFinal, objectMode: true}]});106+expectType<unknown[]>(manyObjectTransformStdoutResult.stdout);107+expectType<[undefined, unknown[], string]>(manyObjectTransformStdoutResult.stdio);108+109+const falseObjectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransformNotObject});110+expectType<string>(falseObjectWebTransformStdoutResult.stdout);111+expectType<[undefined, string, string]>(falseObjectWebTransformStdoutResult.stdio);112+113+const falseObjectDuplexStdoutResult = await execa('unicorns', {stdout: duplexNotObject});114+expectType<string>(falseObjectDuplexStdoutResult.stdout);115+expectType<[undefined, string, string]>(falseObjectDuplexStdoutResult.stdio);116+117+const falseObjectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: duplexNotObjectProperty});118+expectType<string>(falseObjectDuplexPropertyStdoutResult.stdout);119+expectType<[undefined, string, string]>(falseObjectDuplexPropertyStdoutResult.stdio);120+121+const falseObjectTransformStdoutResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: false}});122+expectType<string>(falseObjectTransformStdoutResult.stdout);123+expectType<[undefined, string, string]>(falseObjectTransformStdoutResult.stdio);124+125+const falseObjectWebTransformStderrResult = await execa('unicorns', {stderr: webTransformNotObject});126+expectType<string>(falseObjectWebTransformStderrResult.stderr);127+expectType<[undefined, string, string]>(falseObjectWebTransformStderrResult.stdio);128+129+const falseObjectDuplexStderrResult = await execa('unicorns', {stderr: duplexNotObject});130+expectType<string>(falseObjectDuplexStderrResult.stderr);131+expectType<[undefined, string, string]>(falseObjectDuplexStderrResult.stdio);132+133+const falseObjectDuplexPropertyStderrResult = await execa('unicorns', {stderr: duplexNotObjectProperty});134+expectType<string>(falseObjectDuplexPropertyStderrResult.stderr);135+expectType<[undefined, string, string]>(falseObjectDuplexPropertyStderrResult.stdio);136+137+const falseObjectTransformStderrResult = await execa('unicorns', {stderr: {transform: objectGenerator, final: objectFinal, objectMode: false}});138+expectType<string>(falseObjectTransformStderrResult.stderr);139+expectType<[undefined, string, string]>(falseObjectTransformStderrResult.stdio);140+141+const falseObjectWebTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', webTransformNotObject]});142+expectType<string>(falseObjectWebTransformStdioResult.stderr);143+expectType<[undefined, string, string]>(falseObjectWebTransformStdioResult.stdio);144+145+const falseObjectDuplexStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexNotObject]});146+expectType<string>(falseObjectDuplexStdioResult.stderr);147+expectType<[undefined, string, string]>(falseObjectDuplexStdioResult.stdio);148+149+const falseObjectDuplexPropertyStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexNotObjectProperty]});150+expectType<string>(falseObjectDuplexPropertyStdioResult.stderr);151+expectType<[undefined, string, string]>(falseObjectDuplexPropertyStdioResult.stdio);152+153+const falseObjectTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', {transform: objectGenerator, final: objectFinal, objectMode: false}]});154+expectType<string>(falseObjectTransformStdioResult.stderr);155+expectType<[undefined, string, string]>(falseObjectTransformStdioResult.stdio);156+157+const topObjectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransformInstance});158+expectType<string>(topObjectWebTransformStdoutResult.stdout);159+expectType<[undefined, string, string]>(topObjectWebTransformStdoutResult.stdio);160+161+const undefinedObjectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransform});162+expectType<string>(undefinedObjectWebTransformStdoutResult.stdout);163+expectType<[undefined, string, string]>(undefinedObjectWebTransformStdoutResult.stdio);164+165+const undefinedObjectDuplexStdoutResult = await execa('unicorns', {stdout: duplex});166+expectType<string | unknown[]>(undefinedObjectDuplexStdoutResult.stdout);167+expectType<[undefined, string | unknown[], string]>(undefinedObjectDuplexStdoutResult.stdio);168+169+const undefinedObjectTransformStdoutResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal}});170+expectType<string>(undefinedObjectTransformStdoutResult.stdout);171+expectType<[undefined, string, string]>(undefinedObjectTransformStdoutResult.stdio);172+173+const noObjectTransformStdoutResult = await execa('unicorns', {stdout: objectGenerator, final: objectFinal});174+expectType<string>(noObjectTransformStdoutResult.stdout);175+expectType<[undefined, string, string]>(noObjectTransformStdoutResult.stdio);176+177+const trueTrueObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: true}, all: true});178+expectType<unknown[]>(trueTrueObjectTransformResult.stdout);179+expectType<unknown[]>(trueTrueObjectTransformResult.stderr);180+expectType<unknown[]>(trueTrueObjectTransformResult.all);181+expectType<[undefined, unknown[], unknown[]]>(trueTrueObjectTransformResult.stdio);182+183+const trueFalseObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: false}, all: true});184+expectType<unknown[]>(trueFalseObjectTransformResult.stdout);185+expectType<string>(trueFalseObjectTransformResult.stderr);186+expectType<unknown[]>(trueFalseObjectTransformResult.all);187+expectType<[undefined, unknown[], string]>(trueFalseObjectTransformResult.stdio);188+189+const falseTrueObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: false}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: true}, all: true});190+expectType<string>(falseTrueObjectTransformResult.stdout);191+expectType<unknown[]>(falseTrueObjectTransformResult.stderr);192+expectType<unknown[]>(falseTrueObjectTransformResult.all);193+expectType<[undefined, string, unknown[]]>(falseTrueObjectTransformResult.stdio);194+195+const falseFalseObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: false}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: false}, all: true});196+expectType<string>(falseFalseObjectTransformResult.stdout);197+expectType<string>(falseFalseObjectTransformResult.stderr);198+expectType<string>(falseFalseObjectTransformResult.all);199+expectType<[undefined, string, string]>(falseFalseObjectTransformResult.stdio);200+201+const objectTransformStdoutError = new Error('.') as ExecaError<{stdout: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: true}}>;202+expectType<unknown[]>(objectTransformStdoutError.stdout);203+expectType<[undefined, unknown[], string]>(objectTransformStdoutError.stdio);204+205+const objectTransformStderrError = new Error('.') as ExecaError<{stderr: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: true}}>;206+expectType<unknown[]>(objectTransformStderrError.stderr);207+expectType<[undefined, string, unknown[]]>(objectTransformStderrError.stdio);208+209+const objectTransformStdioError = new Error('.') as ExecaError<{stdio: ['pipe', 'pipe', {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: true}]}>;210+expectType<unknown[]>(objectTransformStdioError.stderr);211+expectType<[undefined, string, unknown[]]>(objectTransformStdioError.stdio);212+213+const falseObjectTransformStdoutError = new Error('.') as ExecaError<{stdout: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: false}}>;214+expectType<string>(falseObjectTransformStdoutError.stdout);215+expectType<[undefined, string, string]>(falseObjectTransformStdoutError.stdio);216+217+const falseObjectTransformStderrError = new Error('.') as ExecaError<{stderr: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: false}}>;218+expectType<string>(falseObjectTransformStderrError.stderr);219+expectType<[undefined, string, string]>(falseObjectTransformStderrError.stdio);220+221+const falseObjectTransformStdioError = new Error('.') as ExecaError<{stdio: ['pipe', 'pipe', {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: false}]}>;222+expectType<string>(falseObjectTransformStdioError.stderr);223+expectType<[undefined, string, string]>(falseObjectTransformStdioError.stdio);added:test-d/pipe.test-d.ts+249 added
1+import {createWriteStream} from 'node:fs';2+import {expectType, expectNotType, expectError} from 'tsd';3+import {execa, execaSync, $, type ExecaResult} from '../index.js';4+5+const fileUrl = new URL('file:///test');6+const stringArray = ['foo', 'bar'] as const;7+const pipeOptions = {from: 'stderr', to: 'fd3', all: true} as const;8+9+const execaPromise = execa('unicorns', {all: true});10+const execaBufferPromise = execa('unicorns', {encoding: 'buffer', all: true});11+const scriptPromise = $`unicorns`;12+13+const bufferResult = await execaBufferPromise;14+type BufferExecaReturnValue = typeof bufferResult;15+type EmptyExecaReturnValue = ExecaResult<{}>;16+type ShortcutExecaReturnValue = ExecaResult<typeof pipeOptions>;17+18+expectNotType<BufferExecaReturnValue>(await execaPromise.pipe(execaPromise));19+expectNotType<BufferExecaReturnValue>(await scriptPromise.pipe(execaPromise));20+expectType<BufferExecaReturnValue>(await execaPromise.pipe(execaBufferPromise));21+expectType<BufferExecaReturnValue>(await scriptPromise.pipe(execaBufferPromise));22+expectType<BufferExecaReturnValue>(await execaPromise.pipe(execaBufferPromise, pipeOptions));23+expectType<BufferExecaReturnValue>(await scriptPromise.pipe(execaBufferPromise, pipeOptions));24+25+expectType<EmptyExecaReturnValue>(await execaPromise.pipe`stdin`);26+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe`stdin`);27+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe(pipeOptions)`stdin`);28+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe(pipeOptions)`stdin`);29+30+expectType<EmptyExecaReturnValue>(await execaPromise.pipe('stdin'));31+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe('stdin'));32+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe('stdin', pipeOptions));33+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe('stdin', pipeOptions));34+35+expectType<BufferExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe(execaBufferPromise));36+expectType<BufferExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe(execaBufferPromise));37+expectType<BufferExecaReturnValue>(await execaPromise.pipe(execaPromise, pipeOptions).pipe(execaBufferPromise));38+expectType<BufferExecaReturnValue>(await scriptPromise.pipe(execaPromise, pipeOptions).pipe(execaBufferPromise));39+expectType<BufferExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe(execaBufferPromise, pipeOptions));40+expectType<BufferExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe(execaBufferPromise, pipeOptions));41+42+expectType<EmptyExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe`stdin`);43+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe`stdin`);44+expectType<EmptyExecaReturnValue>(await execaPromise.pipe(execaPromise, pipeOptions).pipe`stdin`);45+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe(execaPromise, pipeOptions).pipe`stdin`);46+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe(pipeOptions)`stdin`);47+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe(pipeOptions)`stdin`);48+49+expectType<EmptyExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe('stdin'));50+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe('stdin'));51+expectType<EmptyExecaReturnValue>(await execaPromise.pipe(execaPromise, pipeOptions).pipe('stdin'));52+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe(execaPromise, pipeOptions).pipe('stdin'));53+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe('stdin', pipeOptions));54+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe('stdin', pipeOptions));55+56+expectType<BufferExecaReturnValue>(await execaPromise.pipe`stdin`.pipe(execaBufferPromise));57+expectType<BufferExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe(execaBufferPromise));58+expectType<BufferExecaReturnValue>(await execaPromise.pipe(pipeOptions)`stdin`.pipe(execaBufferPromise));59+expectType<BufferExecaReturnValue>(await scriptPromise.pipe(pipeOptions)`stdin`.pipe(execaBufferPromise));60+expectType<BufferExecaReturnValue>(await execaPromise.pipe`stdin`.pipe(execaBufferPromise, pipeOptions));61+expectType<BufferExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe(execaBufferPromise, pipeOptions));62+63+expectType<EmptyExecaReturnValue>(await execaPromise.pipe`stdin`.pipe`stdin`);64+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe`stdin`);65+expectType<EmptyExecaReturnValue>(await execaPromise.pipe(pipeOptions)`stdin`.pipe`stdin`);66+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe(pipeOptions)`stdin`.pipe`stdin`);67+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe`stdin`.pipe(pipeOptions)`stdin`);68+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe(pipeOptions)`stdin`);69+70+expectType<EmptyExecaReturnValue>(await execaPromise.pipe`stdin`.pipe('stdin'));71+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe('stdin'));72+expectType<EmptyExecaReturnValue>(await execaPromise.pipe(pipeOptions)`stdin`.pipe('stdin'));73+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe(pipeOptions)`stdin`.pipe('stdin'));74+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe`stdin`.pipe('stdin', pipeOptions));75+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe('stdin', pipeOptions));76+77+expectType<BufferExecaReturnValue>(await execaPromise.pipe('pipe').pipe(execaBufferPromise));78+expectType<BufferExecaReturnValue>(await scriptPromise.pipe('pipe').pipe(execaBufferPromise));79+expectType<BufferExecaReturnValue>(await execaPromise.pipe('pipe', pipeOptions).pipe(execaBufferPromise));80+expectType<BufferExecaReturnValue>(await scriptPromise.pipe('pipe', pipeOptions).pipe(execaBufferPromise));81+expectType<BufferExecaReturnValue>(await execaPromise.pipe('pipe').pipe(execaBufferPromise, pipeOptions));82+expectType<BufferExecaReturnValue>(await scriptPromise.pipe('pipe').pipe(execaBufferPromise, pipeOptions));83+84+expectType<EmptyExecaReturnValue>(await execaPromise.pipe('pipe').pipe`stdin`);85+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe('pipe').pipe`stdin`);86+expectType<EmptyExecaReturnValue>(await execaPromise.pipe('pipe', pipeOptions).pipe`stdin`);87+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe('pipe', pipeOptions).pipe`stdin`);88+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe('pipe').pipe(pipeOptions)`stdin`);89+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe('pipe').pipe(pipeOptions)`stdin`);90+91+expectType<EmptyExecaReturnValue>(await execaPromise.pipe('pipe').pipe('stdin'));92+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe('pipe').pipe('stdin'));93+expectType<EmptyExecaReturnValue>(await execaPromise.pipe('pipe', pipeOptions).pipe('stdin'));94+expectType<EmptyExecaReturnValue>(await scriptPromise.pipe('pipe', pipeOptions).pipe('stdin'));95+expectType<ShortcutExecaReturnValue>(await execaPromise.pipe('pipe').pipe('stdin', pipeOptions));96+expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe('pipe').pipe('stdin', pipeOptions));97+98+await execaPromise.pipe(execaBufferPromise, {});99+await scriptPromise.pipe(execaBufferPromise, {});100+await execaPromise.pipe({})`stdin`;101+await scriptPromise.pipe({})`stdin`;102+await execaPromise.pipe('stdin', {});103+await scriptPromise.pipe('stdin', {});104+105+expectError(execaPromise.pipe(execaBufferPromise).stdout);106+expectError(scriptPromise.pipe(execaBufferPromise).stdout);107+expectError(execaPromise.pipe`stdin`.stdout);108+expectError(scriptPromise.pipe`stdin`.stdout);109+expectError(execaPromise.pipe('stdin').stdout);110+expectError(scriptPromise.pipe('stdin').stdout);111+112+expectError(await execaPromise.pipe({})({}));113+expectError(await scriptPromise.pipe({})({}));114+expectError(await execaPromise.pipe({})(execaPromise));115+expectError(await scriptPromise.pipe({})(execaPromise));116+expectError(await execaPromise.pipe({})('stdin'));117+expectError(await scriptPromise.pipe({})('stdin'));118+119+expectError(execaPromise.pipe(createWriteStream('output.txt')));120+expectError(scriptPromise.pipe(createWriteStream('output.txt')));121+expectError(execaPromise.pipe(false));122+expectError(scriptPromise.pipe(false));123+124+expectError(execaPromise.pipe(execaBufferPromise, 'stdout'));125+expectError(scriptPromise.pipe(execaBufferPromise, 'stdout'));126+expectError(execaPromise.pipe('stdout')`stdin`);127+expectError(scriptPromise.pipe('stdout')`stdin`);128+129+await execaPromise.pipe(execaBufferPromise, {from: 'stdout'});130+await scriptPromise.pipe(execaBufferPromise, {from: 'stdout'});131+await execaPromise.pipe({from: 'stdout'})`stdin`;132+await scriptPromise.pipe({from: 'stdout'})`stdin`;133+await execaPromise.pipe('stdin', {from: 'stdout'});134+await scriptPromise.pipe('stdin', {from: 'stdout'});135+136+await execaPromise.pipe(execaBufferPromise, {from: 'stderr'});137+await scriptPromise.pipe(execaBufferPromise, {from: 'stderr'});138+await execaPromise.pipe({from: 'stderr'})`stdin`;139+await scriptPromise.pipe({from: 'stderr'})`stdin`;140+await execaPromise.pipe('stdin', {from: 'stderr'});141+await scriptPromise.pipe('stdin', {from: 'stderr'});142+143+await execaPromise.pipe(execaBufferPromise, {from: 'all'});144+await scriptPromise.pipe(execaBufferPromise, {from: 'all'});145+await execaPromise.pipe({from: 'all'})`stdin`;146+await scriptPromise.pipe({from: 'all'})`stdin`;147+await execaPromise.pipe('stdin', {from: 'all'});148+await scriptPromise.pipe('stdin', {from: 'all'});149+150+await execaPromise.pipe(execaBufferPromise, {from: 'fd3'});151+await scriptPromise.pipe(execaBufferPromise, {from: 'fd3'});152+await execaPromise.pipe({from: 'fd3'})`stdin`;153+await scriptPromise.pipe({from: 'fd3'})`stdin`;154+await execaPromise.pipe('stdin', {from: 'fd3'});155+await scriptPromise.pipe('stdin', {from: 'fd3'});156+157+expectError(execaPromise.pipe(execaBufferPromise, {from: 'stdin'}));158+expectError(scriptPromise.pipe(execaBufferPromise, {from: 'stdin'}));159+expectError(execaPromise.pipe({from: 'stdin'})`stdin`);160+expectError(scriptPromise.pipe({from: 'stdin'})`stdin`);161+expectError(execaPromise.pipe('stdin', {from: 'stdin'}));162+expectError(scriptPromise.pipe('stdin', {from: 'stdin'}));163+164+await execaPromise.pipe(execaBufferPromise, {to: 'stdin'});165+await scriptPromise.pipe(execaBufferPromise, {to: 'stdin'});166+await execaPromise.pipe({to: 'stdin'})`stdin`;167+await scriptPromise.pipe({to: 'stdin'})`stdin`;168+await execaPromise.pipe('stdin', {to: 'stdin'});169+await scriptPromise.pipe('stdin', {to: 'stdin'});170+171+await execaPromise.pipe(execaBufferPromise, {to: 'fd3'});172+await scriptPromise.pipe(execaBufferPromise, {to: 'fd3'});173+await execaPromise.pipe({to: 'fd3'})`stdin`;174+await scriptPromise.pipe({to: 'fd3'})`stdin`;175+await execaPromise.pipe('stdin', {to: 'fd3'});176+await scriptPromise.pipe('stdin', {to: 'fd3'});177+178+expectError(execaPromise.pipe(execaBufferPromise, {to: 'stdout'}));179+expectError(scriptPromise.pipe(execaBufferPromise, {to: 'stdout'}));180+expectError(execaPromise.pipe({to: 'stdout'})`stdin`);181+expectError(scriptPromise.pipe({to: 'stdout'})`stdin`);182+expectError(execaPromise.pipe('stdin', {to: 'stdout'}));183+expectError(scriptPromise.pipe('stdin', {to: 'stdout'}));184+185+await execaPromise.pipe(execaBufferPromise, {unpipeSignal: new AbortController().signal});186+await scriptPromise.pipe(execaBufferPromise, {unpipeSignal: new AbortController().signal});187+await execaPromise.pipe({unpipeSignal: new AbortController().signal})`stdin`;188+await scriptPromise.pipe({unpipeSignal: new AbortController().signal})`stdin`;189+await execaPromise.pipe('stdin', {unpipeSignal: new AbortController().signal});190+await scriptPromise.pipe('stdin', {unpipeSignal: new AbortController().signal});191+expectError(await execaPromise.pipe(execaBufferPromise, {unpipeSignal: true}));192+expectError(await scriptPromise.pipe(execaBufferPromise, {unpipeSignal: true}));193+expectError(await execaPromise.pipe({unpipeSignal: true})`stdin`);194+expectError(await scriptPromise.pipe({unpipeSignal: true})`stdin`);195+expectError(await execaPromise.pipe('stdin', {unpipeSignal: true}));196+expectError(await scriptPromise.pipe('stdin', {unpipeSignal: true}));197+198+expectType<EmptyExecaReturnValue>(await execaPromise.pipe('stdin'));199+await execaPromise.pipe('stdin');200+await execaPromise.pipe(fileUrl);201+await execaPromise.pipe('stdin', []);202+await execaPromise.pipe('stdin', stringArray);203+await execaPromise.pipe('stdin', stringArray, {});204+await execaPromise.pipe('stdin', stringArray, {from: 'stderr', to: 'stdin', all: true});205+await execaPromise.pipe('stdin', {from: 'stderr'});206+await execaPromise.pipe('stdin', {to: 'stdin'});207+await execaPromise.pipe('stdin', {all: true});208+209+expectError(await execaPromise.pipe(stringArray));210+expectError(await execaPromise.pipe('stdin', 'foo'));211+expectError(await execaPromise.pipe('stdin', [false]));212+expectError(await execaPromise.pipe('stdin', [], false));213+expectError(await execaPromise.pipe('stdin', {other: true}));214+expectError(await execaPromise.pipe('stdin', [], {other: true}));215+expectError(await execaPromise.pipe('stdin', {from: 'fd'}));216+expectError(await execaPromise.pipe('stdin', [], {from: 'fd'}));217+expectError(await execaPromise.pipe('stdin', {from: 'fdNotANumber'}));218+expectError(await execaPromise.pipe('stdin', [], {from: 'fdNotANumber'}));219+expectError(await execaPromise.pipe('stdin', {from: 'other'}));220+expectError(await execaPromise.pipe('stdin', [], {from: 'other'}));221+expectError(await execaPromise.pipe('stdin', {to: 'fd'}));222+expectError(await execaPromise.pipe('stdin', [], {to: 'fd'}));223+expectError(await execaPromise.pipe('stdin', {to: 'fdNotANumber'}));224+expectError(await execaPromise.pipe('stdin', [], {to: 'fdNotANumber'}));225+expectError(await execaPromise.pipe('stdin', {to: 'other'}));226+expectError(await execaPromise.pipe('stdin', [], {to: 'other'}));227+228+const pipeResult = await execaPromise.pipe`stdin`;229+expectType<string>(pipeResult.stdout);230+const ignorePipeResult = await execaPromise.pipe({stdout: 'ignore'})`stdin`;231+expectType<undefined>(ignorePipeResult.stdout);232+233+const scriptPipeResult = await scriptPromise.pipe`stdin`;234+expectType<string>(scriptPipeResult.stdout);235+const ignoreScriptPipeResult = await scriptPromise.pipe({stdout: 'ignore'})`stdin`;236+expectType<undefined>(ignoreScriptPipeResult.stdout);237+238+const shortcutPipeResult = await execaPromise.pipe('stdin');239+expectType<string>(shortcutPipeResult.stdout);240+const ignoreShortcutPipeResult = await execaPromise.pipe('stdin', {stdout: 'ignore'});241+expectType<undefined>(ignoreShortcutPipeResult.stdout);242+243+const scriptShortcutPipeResult = await scriptPromise.pipe('stdin');244+expectType<string>(scriptShortcutPipeResult.stdout);245+const ignoreShortcutScriptPipeResult = await scriptPromise.pipe('stdin', {stdout: 'ignore'});246+expectType<undefined>(ignoreShortcutScriptPipeResult.stdout);247+248+const unicornsResult = execaSync('unicorns');249+expectError(unicornsResult.pipe);added:types/arguments/encoding-option.d.ts+19 added
1+type DefaultEncodingOption = 'utf8';2+type TextEncodingOption =3+ | DefaultEncodingOption4+ | 'utf16le';5+6+export type BufferEncodingOption = 'buffer';7+export type BinaryEncodingOption =8+ | BufferEncodingOption9+ | 'hex'10+ | 'base64'11+ | 'base64url'12+ | 'latin1'13+ | 'ascii';14+15+// `options.encoding`16+export type EncodingOption =17+ | TextEncodingOption18+ | BinaryEncodingOption19+ | undefined;added:types/arguments/fd-options.d.ts+8 added
1+type FileDescriptorOption = `fd${number}`;2+3+// `from` option of `subprocess.readable|duplex|iterable|pipe()`4+// Also used by fd-specific options5+export type FromOption = 'stdout' | 'stderr' | 'all' | FileDescriptorOption;6+7+// `to` option of `subprocess.writable|duplex|pipe()`8+export type ToOption = 'stdin' | FileDescriptorOption;added:types/arguments/options.d.ts+430 added
1+import type {Readable} from 'node:stream';2+import type {Unless} from '../utils';3+import type {StdinOptionCommon, StdoutStderrOptionCommon, StdioOptionsProperty} from '../stdio/type';4+import type {FdGenericOption} from './specific';5+import type {EncodingOption} from './encoding-option';6+7+export type CommonOptions<IsSync extends boolean = boolean> = {8+ /**9+ Prefer locally installed binaries when looking for a binary to execute.10+11+ If you `$ npm install foo`, you can then `execa('foo')`.12+13+ @default `true` with `$`, `false` otherwise14+ */15+ readonly preferLocal?: boolean;16+17+ /**18+ Preferred path to find locally installed binaries in (use with `preferLocal`).19+20+ @default process.cwd()21+ */22+ readonly localDir?: string | URL;23+24+ /**25+ If `true`, runs with Node.js. The first argument must be a Node.js file.26+27+ @default `true` with `execaNode()`, `false` otherwise28+ */29+ readonly node?: boolean;30+31+ /**32+ Path to the Node.js executable.33+34+ For example, this can be used together with [`get-node`](https://github.com/ehmicky/get-node) to run a specific Node.js version.35+36+ Requires the `node` option to be `true`.37+38+ @default [`process.execPath`](https://nodejs.org/api/process.html#process_process_execpath) (current Node.js executable)39+ */40+ readonly nodePath?: string | URL;41+42+ /**43+ List of [CLI options](https://nodejs.org/api/cli.html#cli_options) passed to the Node.js executable.44+45+ Requires the `node` option to be `true`.46+47+ @default [`process.execArgv`](https://nodejs.org/api/process.html#process_process_execargv) (current Node.js CLI options)48+ */49+ readonly nodeOptions?: readonly string[];50+51+ /**52+ Write some input to the subprocess' `stdin`.53+54+ See also the `inputFile` and `stdin` options.55+ */56+ readonly input?: string | Uint8Array | Readable;57+58+ /**59+ Use a file as input to the subprocess' `stdin`.60+61+ See also the `input` and `stdin` options.62+ */63+ readonly inputFile?: string | URL;64+65+ /**66+ How to setup the subprocess' standard input. This can be:67+ - `'pipe'`: Sets `subprocess.stdin` stream.68+ - `'overlapped'`: Like `'pipe'` but asynchronous on Windows.69+ - `'ignore'`: Do not use `stdin`.70+ - `'inherit'`: Re-use the current process' `stdin`.71+ - an integer: Re-use a specific file descriptor from the current process.72+ - a Node.js `Readable` stream.73+ - `{ file: 'path' }` object.74+ - a file URL.75+ - a web [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).76+ - an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) or an [`AsyncIterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols)77+ - an `Uint8Array`.78+79+ This can be an [array of values](https://github.com/sindresorhus/execa#redirect-stdinstdoutstderr-to-multiple-destinations) such as `['inherit', 'pipe']` or `[filePath, 'pipe']`.80+81+ This can also be a generator function or a [`Duplex`](https://nodejs.org/api/stream.html#class-streamduplex) or a [web `TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) to transform the input. [Learn more.](https://github.com/sindresorhus/execa/tree/main/docs/transform.md)82+83+ @default `inherit` with `$`, `pipe` otherwise84+ */85+ readonly stdin?: StdinOptionCommon<IsSync>;86+87+ /**88+ How to setup the subprocess' standard output. This can be:89+ - `'pipe'`: Sets `result.stdout` (as a string or `Uint8Array`) and `subprocess.stdout` (as a stream).90+ - `'overlapped'`: Like `'pipe'` but asynchronous on Windows.91+ - `'ignore'`: Do not use `stdout`.92+ - `'inherit'`: Re-use the current process' `stdout`.93+ - an integer: Re-use a specific file descriptor from the current process.94+ - a Node.js `Writable` stream.95+ - `{ file: 'path' }` object.96+ - a file URL.97+ - a web [`WritableStream`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream).98+99+ This can be an [array of values](https://github.com/sindresorhus/execa#redirect-stdinstdoutstderr-to-multiple-destinations) such as `['inherit', 'pipe']` or `[filePath, 'pipe']`.100+101+ This can also be a generator function or a [`Duplex`](https://nodejs.org/api/stream.html#class-streamduplex) or a [web `TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) to transform the output. [Learn more.](https://github.com/sindresorhus/execa/tree/main/docs/transform.md)102+103+ @default 'pipe'104+ */105+ readonly stdout?: StdoutStderrOptionCommon<IsSync>;106+107+ /**108+ How to setup the subprocess' standard error. This can be:109+ - `'pipe'`: Sets `result.stderr` (as a string or `Uint8Array`) and `subprocess.stderr` (as a stream).110+ - `'overlapped'`: Like `'pipe'` but asynchronous on Windows.111+ - `'ignore'`: Do not use `stderr`.112+ - `'inherit'`: Re-use the current process' `stderr`.113+ - an integer: Re-use a specific file descriptor from the current process.114+ - a Node.js `Writable` stream.115+ - `{ file: 'path' }` object.116+ - a file URL.117+ - a web [`WritableStream`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream).118+119+ This can be an [array of values](https://github.com/sindresorhus/execa#redirect-stdinstdoutstderr-to-multiple-destinations) such as `['inherit', 'pipe']` or `[filePath, 'pipe']`.120+121+ This can also be a generator function or a [`Duplex`](https://nodejs.org/api/stream.html#class-streamduplex) or a [web `TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) to transform the output. [Learn more.](https://github.com/sindresorhus/execa/tree/main/docs/transform.md)122+123+ @default 'pipe'124+ */125+ readonly stderr?: StdoutStderrOptionCommon<IsSync>;126+127+ /**128+ Like the `stdin`, `stdout` and `stderr` options but for all file descriptors at once. For example, `{stdio: ['ignore', 'pipe', 'pipe']}` is the same as `{stdin: 'ignore', stdout: 'pipe', stderr: 'pipe'}`.129+130+ A single string can be used as a shortcut. For example, `{stdio: 'pipe'}` is the same as `{stdin: 'pipe', stdout: 'pipe', stderr: 'pipe'}`.131+132+ The array can have more than 3 items, to create additional file descriptors beyond `stdin`/`stdout`/`stderr`. For example, `{stdio: ['pipe', 'pipe', 'pipe', 'pipe']}` sets a fourth file descriptor.133+134+ @default 'pipe'135+ */136+ readonly stdio?: StdioOptionsProperty<IsSync>;137+138+ /**139+ Set `result.stdout`, `result.stderr`, `result.all` and `result.stdio` as arrays of strings, splitting the subprocess' output into lines.140+141+ This cannot be used if the `encoding` option is binary.142+143+ By default, this applies to both `stdout` and `stderr`, but different values can also be passed.144+145+ @default false146+ */147+ readonly lines?: FdGenericOption<boolean>;148+149+ /**150+ Setting this to `false` resolves the promise with the error instead of rejecting it.151+152+ @default true153+ */154+ readonly reject?: boolean;155+156+ /**157+ Strip the final [newline character](https://en.wikipedia.org/wiki/Newline) from the output.158+159+ If the `lines` option is true, this applies to each output line instead.160+161+ By default, this applies to both `stdout` and `stderr`, but different values can also be passed.162+163+ @default true164+ */165+ readonly stripFinalNewline?: FdGenericOption<boolean>;166+167+ /**168+ If `true`, the subprocess uses both the `env` option and the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).169+ If `false`, only the `env` option is used, not `process.env`.170+171+ @default true172+ */173+ readonly extendEnv?: boolean;174+175+ /**176+ Current working directory of the subprocess.177+178+ This is also used to resolve the `nodePath` option when it is a relative path.179+180+ @default process.cwd()181+ */182+ readonly cwd?: string | URL;183+184+ /**185+ Environment key-value pairs.186+187+ Unless the `extendEnv` option is `false`, the subprocess also uses the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).188+189+ @default process.env190+ */191+ readonly env?: NodeJS.ProcessEnv;192+193+ /**194+ Explicitly set the value of `argv[0]` sent to the subprocess. This will be set to `command` or `file` if not specified.195+ */196+ readonly argv0?: string;197+198+ /**199+ Sets the user identity of the subprocess.200+ */201+ readonly uid?: number;202+203+ /**204+ Sets the group identity of the subprocess.205+ */206+ readonly gid?: number;207+208+ /**209+ If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.210+211+ We recommend against using this option since it is:212+ - not cross-platform, encouraging shell-specific syntax.213+ - slower, because of the additional shell interpretation.214+ - unsafe, potentially allowing command injection.215+216+ @default false217+ */218+ readonly shell?: boolean | string | URL;219+220+ /**221+ If the subprocess outputs text, specifies its character encoding, either `'utf8'` or `'utf16le'`.222+223+ If it outputs binary data instead, this should be either:224+ - `'buffer'`: returns the binary output as an `Uint8Array`.225+ - `'hex'`, `'base64'`, `'base64url'`, [`'latin1'`](https://nodejs.org/api/buffer.html#buffers-and-character-encodings) or [`'ascii'`](https://nodejs.org/api/buffer.html#buffers-and-character-encodings): encodes the binary output as a string.226+227+ The output is available with `result.stdout`, `result.stderr` and `result.stdio`.228+229+ @default 'utf8'230+ */231+ readonly encoding?: EncodingOption;232+233+ /**234+ If `timeout` is greater than `0`, the subprocess will be terminated if it runs for longer than that amount of milliseconds.235+236+ @default 0237+ */238+ readonly timeout?: number;239+240+ /**241+ Largest amount of data allowed on `stdout`, `stderr` and `stdio`.242+243+ When this threshold is hit, the subprocess fails and `error.isMaxBuffer` becomes `true`.244+245+ This is measured:246+ - By default: in [characters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length).247+ - If the `encoding` option is `'buffer'`: in bytes.248+ - If the `lines` option is `true`: in lines.249+ - If a transform in object mode is used: in objects.250+251+ By default, this applies to both `stdout` and `stderr`, but different values can also be passed.252+253+ @default 100_000_000254+ */255+ readonly maxBuffer?: FdGenericOption<number>;256+257+ /**258+ Signal used to terminate the subprocess when:259+ - using the `cancelSignal`, `timeout`, `maxBuffer` or `cleanup` option260+ - calling `subprocess.kill()` with no arguments261+262+ This can be either a name (like `"SIGTERM"`) or a number (like `9`).263+264+ @default 'SIGTERM'265+ */266+ readonly killSignal?: string | number;267+268+ /**269+ If the subprocess is terminated but does not exit, forcefully exit it by sending [`SIGKILL`](https://en.wikipedia.org/wiki/Signal_(IPC)#SIGKILL).270+271+ The grace period is 5 seconds by default. This feature can be disabled with `false`.272+273+ This works when the subprocess is terminated by either:274+ - the `cancelSignal`, `timeout`, `maxBuffer` or `cleanup` option275+ - calling `subprocess.kill()` with no arguments276+277+ This does not work when the subprocess is terminated by either:278+ - calling `subprocess.kill()` with an argument279+ - calling [`process.kill(subprocess.pid)`](https://nodejs.org/api/process.html#processkillpid-signal)280+ - sending a termination signal from another process281+282+ Also, this does not work on Windows, because Windows [doesn't support signals](https://nodejs.org/api/process.html#process_signal_events): `SIGKILL` and `SIGTERM` both terminate the subprocess immediately. Other packages (such as [`taskkill`](https://github.com/sindresorhus/taskkill)) can be used to achieve fail-safe termination on Windows.283+284+ @default 5000285+ */286+ forceKillAfterDelay?: Unless<IsSync, number | false>;287+288+ /**289+ If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`.290+291+ @default false292+ */293+ readonly windowsVerbatimArguments?: boolean;294+295+ /**296+ On Windows, do not create a new console window. Please note this also prevents `CTRL-C` [from working](https://github.com/nodejs/node/issues/29837) on Windows.297+298+ @default true299+ */300+ readonly windowsHide?: boolean;301+302+ /**303+ If `verbose` is `'short'` or `'full'`, prints each command on `stderr` before executing it. When the command completes, prints its duration and (if it failed) its error.304+305+ If `verbose` is `'full'`, the command's `stdout` and `stderr` are printed too, unless either:306+ - the `stdout`/`stderr` option is `ignore` or `inherit`.307+ - the `stdout`/`stderr` is redirected to [a stream](https://nodejs.org/api/stream.html#readablepipedestination-options), a file, a file descriptor, or another subprocess.308+ - the `encoding` option is binary.309+310+ This can also be set to `'full'` by setting the `NODE_DEBUG=execa` environment variable in the current process.311+312+ By default, this applies to both `stdout` and `stderr`, but different values can also be passed.313+314+ @default 'none'315+ */316+ readonly verbose?: FdGenericOption<'none' | 'short' | 'full'>;317+318+ /**319+ Kill the subprocess when the current process exits unless either:320+ - the subprocess is `detached`.321+ - the current process is terminated abruptly, for example, with `SIGKILL` as opposed to `SIGTERM` or a normal exit.322+323+ @default true324+ */325+ readonly cleanup?: Unless<IsSync, boolean>;326+327+ /**328+ Whether to return the subprocess' output using the `result.stdout`, `result.stderr`, `result.all` and `result.stdio` properties.329+330+ On failure, the `error.stdout`, `error.stderr`, `error.all` and `error.stdio` properties are used instead.331+332+ When `buffer` is `false`, the output can still be read using the `subprocess.stdout`, `subprocess.stderr`, `subprocess.stdio` and `subprocess.all` streams. If the output is read, this should be done right away to avoid missing any data.333+334+ By default, this applies to both `stdout` and `stderr`, but different values can also be passed.335+336+ @default true337+ */338+ readonly buffer?: FdGenericOption<boolean>;339+340+ /**341+ Add a `subprocess.all` stream and a `result.all` property. They contain the combined/[interleaved](#ensuring-all-output-is-interleaved) output of the subprocess' `stdout` and `stderr`.342+343+ @default false344+ */345+ readonly all?: boolean;346+347+ /**348+ Enables exchanging messages with the subprocess using `subprocess.send(message)` and `subprocess.on('message', (message) => {})`.349+350+ @default `true` if the `node` option is enabled, `false` otherwise351+ */352+ readonly ipc?: Unless<IsSync, boolean>;353+354+ /**355+ Specify the kind of serialization used for sending messages between subprocesses when using the `ipc` option:356+ - `json`: Uses `JSON.stringify()` and `JSON.parse()`.357+ - `advanced`: Uses [`v8.serialize()`](https://nodejs.org/api/v8.html#v8_v8_serialize_value)358+359+ [More info.](https://nodejs.org/api/child_process.html#child_process_advanced_serialization)360+361+ @default 'advanced'362+ */363+ readonly serialization?: Unless<IsSync, 'json' | 'advanced'>;364+365+ /**366+ Prepare subprocess to run independently of the current process. Specific behavior depends on the platform.367+368+ @default false369+ */370+ readonly detached?: Unless<IsSync, boolean>;371+372+ /**373+ You can abort the subprocess using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).374+375+ When `AbortController.abort()` is called, `result.isCanceled` becomes `true`.376+377+ @example378+ ```379+ import {execa} from 'execa';380+381+ const abortController = new AbortController();382+ const subprocess = execa('node', [], {cancelSignal: abortController.signal});383+384+ setTimeout(() => {385+ abortController.abort();386+ }, 1000);387+388+ try {389+ await subprocess;390+ } catch (error) {391+ console.log(error.isTerminated); // true392+ console.log(error.isCanceled); // true393+ }394+ ```395+ */396+ readonly cancelSignal?: Unless<IsSync, AbortSignal>;397+};398+399+/**400+Subprocess options.401+402+Some options are related to the subprocess output: `verbose`, `lines`, `stripFinalNewline`, `buffer`, `maxBuffer`. By default, those options apply to all file descriptors (`stdout`, `stderr`, etc.). A plain object can be passed instead to apply them to only `stdout`, `stderr`, `fd3`, etc.403+404+@example405+406+```407+await execa('./run.js', {verbose: 'full'}) // Same value for stdout and stderr408+await execa('./run.js', {verbose: {stdout: 'none', stderr: 'full'}}) // Different values409+```410+*/411+export type Options = CommonOptions<false>;412+413+/**414+Subprocess options, with synchronous methods.415+416+Some options are related to the subprocess output: `verbose`, `lines`, `stripFinalNewline`, `buffer`, `maxBuffer`. By default, those options apply to all file descriptors (`stdout`, `stderr`, etc.). A plain object can be passed instead to apply them to only `stdout`, `stderr`, `fd3`, etc.417+418+@example419+420+```421+execaSync('./run.js', {verbose: 'full'}) // Same value for stdout and stderr422+execaSync('./run.js', {verbose: {stdout: 'none', stderr: 'full'}}) // Different values423+```424+*/425+export type SyncOptions = CommonOptions<true>;426+427+export type StricterOptions<428+ WideOptions extends CommonOptions,429+ StrictOptions extends CommonOptions,430+> = WideOptions extends StrictOptions ? WideOptions : StrictOptions;added:types/arguments/specific.d.ts+48 added
1+import type {FromOption} from './fd-options';2+3+// Options which can be fd-specific like `{verbose: {stdout: 'none', stderr: 'full'}}`4+export type FdGenericOption<OptionType = unknown> = OptionType | GenericOptionObject<OptionType>;5+6+type GenericOptionObject<OptionType = unknown> = {7+ readonly [FdName in FromOption]?: OptionType8+};9+10+// Retrieve fd-specific option's value11+export type FdSpecificOption<12+ GenericOption extends FdGenericOption,13+ FdNumber extends string,14+> = GenericOption extends GenericOptionObject15+ ? FdSpecificObjectOption<GenericOption, FdNumber>16+ : GenericOption;17+18+type FdSpecificObjectOption<19+ GenericOption extends GenericOptionObject,20+ FdNumber extends string,21+> = keyof GenericOption extends FromOption22+ ? FdNumberToFromOption<FdNumber, keyof GenericOption> extends never23+ ? undefined24+ : GenericOption[FdNumberToFromOption<FdNumber, keyof GenericOption>]25+ : GenericOption;26+27+type FdNumberToFromOption<28+ FdNumber extends string,29+ FromOptions extends FromOption,30+> = FdNumber extends '1'31+ ? 'stdout' extends FromOptions32+ ? 'stdout'33+ : 'fd1' extends FromOptions34+ ? 'fd1'35+ : 'all' extends FromOptions36+ ? 'all'37+ : never38+ : FdNumber extends '2'39+ ? 'stderr' extends FromOptions40+ ? 'stderr'41+ : 'fd2' extends FromOptions42+ ? 'fd2'43+ : 'all' extends FromOptions44+ ? 'all'45+ : never46+ : `fd${FdNumber}` extends FromOptions47+ ? `fd${FdNumber}`48+ : never;added:types/methods/command.d.ts+83 added
1+import type {Options, SyncOptions} from '../arguments/options';2+import type {ExecaSyncResult} from '../return/result';3+import type {ExecaSubprocess} from '../subprocess/subprocess';4+import type {SimpleTemplateString} from './template';5+6+type ExecaCommand<OptionsType extends Options> = {7+ <NewOptionsType extends Options = {}>(options: NewOptionsType): ExecaCommand<OptionsType & NewOptionsType>;8+9+ (...templateString: SimpleTemplateString): ExecaSubprocess<OptionsType>;10+11+ <NewOptionsType extends Options = {}>(12+ command: string,13+ options?: NewOptionsType,14+ ): ExecaSubprocess<OptionsType & NewOptionsType>;15+};16+17+/**18+`execa` with the template string syntax allows the `file` or the `arguments` to be user-defined (by injecting them with `${}`). However, if _both_ the `file` and the `arguments` are user-defined, _and_ those are supplied as a single string, then `execaCommand(command)` must be used instead.19+20+This is only intended for very specific cases, such as a REPL. This should be avoided otherwise.21+22+Just like `execa()`, this can bind options. It can also be run synchronously using `execaCommandSync()`.23+24+Arguments are automatically escaped. They can contain any character, but spaces must be escaped with a backslash like `execaCommand('echo has\\ space')`.25+26+@param command - The program/script to execute and its arguments.27+@returns An `ExecaSubprocess` that is both:28+- a `Promise` resolving or rejecting with a subprocess `result`.29+- a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.30+@throws A subprocess `result` error31+32+@example33+```34+import {execaCommand} from 'execa';35+36+const {stdout} = await execaCommand('echo unicorns');37+console.log(stdout);38+//=> 'unicorns'39+```40+*/41+export declare const execaCommand: ExecaCommand<{}>;42+43+type ExecaCommandSync<OptionsType extends SyncOptions> = {44+ <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaCommandSync<OptionsType & NewOptionsType>;45+46+ (...templateString: SimpleTemplateString): ExecaSyncResult<OptionsType>;47+48+ <NewOptionsType extends SyncOptions = {}>(49+ command: string,50+ options?: NewOptionsType,51+ ): ExecaSyncResult<OptionsType & NewOptionsType>;52+};53+54+/**55+Same as `execaCommand()` but synchronous.56+57+Returns or throws a subprocess `result`. The `subprocess` is not returned: its methods and properties are not available.58+59+The following features cannot be used:60+- Streams: `subprocess.stdin`, `subprocess.stdout`, `subprocess.stderr`, `subprocess.readable()`, `subprocess.writable()`, `subprocess.duplex()`.61+- The `stdin`, `stdout`, `stderr` and `stdio` options cannot be `'overlapped'`, an async iterable, an async transform, a `Duplex`, nor a web stream. Node.js streams can be passed but only if either they [have a file descriptor](#redirect-a-nodejs-stream-fromto-stdinstdoutstderr), or the `input` option is used.62+- Signal termination: `subprocess.kill()`, `subprocess.pid`, `cleanup` option, `cancelSignal` option, `forceKillAfterDelay` option.63+- Piping multiple processes: `subprocess.pipe()`.64+- `subprocess.iterable()`.65+- `ipc` and `serialization` options.66+- `result.all` is not interleaved.67+- `detached` option.68+- The `maxBuffer` option is always measured in bytes, not in characters, lines nor objects. Also, it ignores transforms and the `encoding` option.69+70+@param command - The program/script to execute and its arguments.71+@returns A subprocess `result` object72+@throws A subprocess `result` error73+74+@example75+```76+import {execaCommandSync} from 'execa';77+78+const {stdout} = execaCommandSync('echo unicorns');79+console.log(stdout);80+//=> 'unicorns'81+```82+*/83+export declare const execaCommandSync: ExecaCommandSync<{}>;added:types/methods/main-async.d.ts+202 added
1+import type {Options} from '../arguments/options';2+import type {ExecaSubprocess} from '../subprocess/subprocess';3+import type {TemplateString} from './template';4+5+type Execa<OptionsType extends Options> = {6+ <NewOptionsType extends Options = {}>(options: NewOptionsType): Execa<OptionsType & NewOptionsType>;7+8+ (...templateString: TemplateString): ExecaSubprocess<OptionsType>;9+10+ <NewOptionsType extends Options = {}>(11+ file: string | URL,12+ arguments?: readonly string[],13+ options?: NewOptionsType,14+ ): ExecaSubprocess<OptionsType & NewOptionsType>;15+16+ <NewOptionsType extends Options = {}>(17+ file: string | URL,18+ options?: NewOptionsType,19+ ): ExecaSubprocess<OptionsType & NewOptionsType>;20+};21+22+/**23+Executes a command using `file ...arguments`.24+25+Arguments are automatically escaped. They can contain any character, including spaces, tabs and newlines.26+27+When `command` is a template string, it includes both the `file` and its `arguments`.28+29+The `command` template string can inject any `${value}` with the following types: string, number, `subprocess` or an array of those types. For example: `` execa`echo one ${'two'} ${3} ${['four', 'five']}` ``. For `${subprocess}`, the subprocess's `stdout` is used.30+31+When `command` is a template string, arguments can contain any character, but spaces, tabs and newlines must use `${}` like `` execa`echo ${'has space'}` ``.32+33+The `command` template string can use multiple lines and indentation.34+35+`execa(options)` can be used to return a new instance of Execa but with different default `options`. Consecutive calls are merged to previous ones. This allows setting global options or sharing options between multiple commands.36+37+@param file - The program/script to execute, as a string or file URL38+@param arguments - Arguments to pass to `file` on execution.39+@returns An `ExecaSubprocess` that is both:40+- a `Promise` resolving or rejecting with a subprocess `result`.41+- a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.42+@throws A subprocess `result` error43+44+@example <caption>Promise interface</caption>45+```46+import {execa} from 'execa';47+48+const {stdout} = await execa('echo', ['unicorns']);49+console.log(stdout);50+//=> 'unicorns'51+```52+53+@example <caption>Global/shared options</caption>54+```55+import {execa as execa_} from 'execa';56+57+const execa = execa_({verbose: 'full'});58+59+await execa('echo', ['unicorns']);60+//=> 'unicorns'61+```62+63+@example <caption>Template string interface</caption>64+65+```66+import {execa} from 'execa';67+68+const arg = 'unicorns';69+const {stdout} = await execa`echo ${arg} & rainbows!`;70+console.log(stdout);71+//=> 'unicorns & rainbows!'72+```73+74+@example <caption>Template string multiple arguments</caption>75+76+```77+import {execa} from 'execa';78+79+const args = ['unicorns', '&', 'rainbows!'];80+const {stdout} = await execa`echo ${args}`;81+console.log(stdout);82+//=> 'unicorns & rainbows!'83+```84+85+@example <caption>Template string with options</caption>86+87+```88+import {execa} from 'execa';89+90+await execa({verbose: 'full'})`echo unicorns`;91+//=> 'unicorns'92+```93+94+@example <caption>Redirect output to a file</caption>95+```96+import {execa} from 'execa';97+98+// Similar to `echo unicorns > stdout.txt` in Bash99+await execa('echo', ['unicorns'], {stdout: {file: 'stdout.txt'}});100+101+// Similar to `echo unicorns 2> stdout.txt` in Bash102+await execa('echo', ['unicorns'], {stderr: {file: 'stderr.txt'}});103+104+// Similar to `echo unicorns &> stdout.txt` in Bash105+await execa('echo', ['unicorns'], {stdout: {file: 'all.txt'}, stderr: {file: 'all.txt'}});106+```107+108+@example <caption>Redirect input from a file</caption>109+```110+import {execa} from 'execa';111+112+// Similar to `cat < stdin.txt` in Bash113+const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});114+console.log(stdout);115+//=> 'unicorns'116+```117+118+@example <caption>Save and pipe output from a subprocess</caption>119+```120+import {execa} from 'execa';121+122+const {stdout} = await execa('echo', ['unicorns'], {stdout: ['pipe', 'inherit']});123+// Prints `unicorns`124+console.log(stdout);125+// Also returns 'unicorns'126+```127+128+@example <caption>Pipe multiple subprocesses</caption>129+```130+import {execa} from 'execa';131+132+// Similar to `echo unicorns | cat` in Bash133+const {stdout} = await execa('echo', ['unicorns']).pipe(execa('cat'));134+console.log(stdout);135+//=> 'unicorns'136+```137+138+@example <caption>Pipe with template strings</caption>139+```140+import {execa} from 'execa';141+142+await execa`npm run build`143+ .pipe`sort`144+ .pipe`head -n2`;145+```146+147+@example <caption>Iterate over output lines</caption>148+```149+import {execa} from 'execa';150+151+for await (const line of execa`npm run build`)) {152+ if (line.includes('ERROR')) {153+ console.log(line);154+ }155+}156+```157+158+@example <caption>Handling errors</caption>159+```160+import {execa} from 'execa';161+162+// Catching an error163+try {164+ await execa('unknown', ['command']);165+} catch (error) {166+ console.log(error);167+ /*168+ ExecaError: Command failed with ENOENT: unknown command169+ spawn unknown ENOENT170+ at ...171+ at ... {172+ shortMessage: 'Command failed with ENOENT: unknown command\nspawn unknown ENOENT',173+ originalMessage: 'spawn unknown ENOENT',174+ command: 'unknown command',175+ escapedCommand: 'unknown command',176+ cwd: '/path/to/cwd',177+ durationMs: 28.217566,178+ failed: true,179+ timedOut: false,180+ isCanceled: false,181+ isTerminated: false,182+ isMaxBuffer: false,183+ code: 'ENOENT',184+ stdout: '',185+ stderr: '',186+ stdio: [undefined, '', ''],187+ pipedFrom: []188+ [cause]: Error: spawn unknown ENOENT189+ at ...190+ at ... {191+ errno: -2,192+ code: 'ENOENT',193+ syscall: 'spawn unknown',194+ path: 'unknown',195+ spawnargs: [ 'command' ]196+ }197+ }198+ \*\/199+}200+```201+*/202+export declare const execa: Execa<{}>;added:types/methods/main-sync.d.ts+96 added
1+import type {SyncOptions} from '../arguments/options';2+import type {ExecaSyncResult} from '../return/result';3+import type {TemplateString} from './template';4+5+type ExecaSync<OptionsType extends SyncOptions> = {6+ <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaSync<OptionsType & NewOptionsType>;7+8+ (...templateString: TemplateString): ExecaSyncResult<OptionsType>;9+10+ <NewOptionsType extends SyncOptions = {}>(11+ file: string | URL,12+ arguments?: readonly string[],13+ options?: NewOptionsType,14+ ): ExecaSyncResult<OptionsType & NewOptionsType>;15+16+ <NewOptionsType extends SyncOptions = {}>(17+ file: string | URL,18+ options?: NewOptionsType,19+ ): ExecaSyncResult<OptionsType & NewOptionsType>;20+};21+22+/**23+Same as `execa()` but synchronous.24+25+Returns or throws a subprocess `result`. The `subprocess` is not returned: its methods and properties are not available.26+27+The following features cannot be used:28+- Streams: `subprocess.stdin`, `subprocess.stdout`, `subprocess.stderr`, `subprocess.readable()`, `subprocess.writable()`, `subprocess.duplex()`.29+- The `stdin`, `stdout`, `stderr` and `stdio` options cannot be `'overlapped'`, an async iterable, an async transform, a `Duplex`, nor a web stream. Node.js streams can be passed but only if either they [have a file descriptor](#redirect-a-nodejs-stream-fromto-stdinstdoutstderr), or the `input` option is used.30+- Signal termination: `subprocess.kill()`, `subprocess.pid`, `cleanup` option, `cancelSignal` option, `forceKillAfterDelay` option.31+- Piping multiple processes: `subprocess.pipe()`.32+- `subprocess.iterable()`.33+- `ipc` and `serialization` options.34+- `result.all` is not interleaved.35+- `detached` option.36+- The `maxBuffer` option is always measured in bytes, not in characters, lines nor objects. Also, it ignores transforms and the `encoding` option.37+38+@param file - The program/script to execute, as a string or file URL39+@param arguments - Arguments to pass to `file` on execution.40+@returns A subprocess `result` object41+@throws A subprocess `result` error42+43+@example <caption>Promise interface</caption>44+```45+import {execa} from 'execa';46+47+const {stdout} = execaSync('echo', ['unicorns']);48+console.log(stdout);49+//=> 'unicorns'50+```51+52+@example <caption>Redirect input from a file</caption>53+```54+import {execa} from 'execa';55+56+// Similar to `cat < stdin.txt` in Bash57+const {stdout} = execaSync('cat', {inputFile: 'stdin.txt'});58+console.log(stdout);59+//=> 'unicorns'60+```61+62+@example <caption>Handling errors</caption>63+```64+import {execa} from 'execa';65+66+// Catching an error67+try {68+ execaSync('unknown', ['command']);69+} catch (error) {70+ console.log(error);71+ /*72+ {73+ message: 'Command failed with ENOENT: unknown command\nspawnSync unknown ENOENT',74+ errno: -2,75+ code: 'ENOENT',76+ syscall: 'spawnSync unknown',77+ path: 'unknown',78+ spawnargs: ['command'],79+ shortMessage: 'Command failed with ENOENT: unknown command\nspawnSync unknown ENOENT',80+ originalMessage: 'spawnSync unknown ENOENT',81+ command: 'unknown command',82+ escapedCommand: 'unknown command',83+ cwd: '/path/to/cwd',84+ failed: true,85+ timedOut: false,86+ isCanceled: false,87+ isTerminated: false,88+ isMaxBuffer: false,89+ stdio: [],90+ pipedFrom: []91+ }92+ \*\/93+}94+```95+*/96+export declare const execaSync: ExecaSync<{}>;added:types/methods/node.d.ts+44 added
1+import type {Options} from '../arguments/options';2+import type {ExecaSubprocess} from '../subprocess/subprocess';3+import type {TemplateString} from './template';4+5+type ExecaNode<OptionsType extends Options> = {6+ <NewOptionsType extends Options = {}>(options: NewOptionsType): ExecaNode<OptionsType & NewOptionsType>;7+8+ (...templateString: TemplateString): ExecaSubprocess<OptionsType>;9+10+ <NewOptionsType extends Options = {}>(11+ scriptPath: string | URL,12+ arguments?: readonly string[],13+ options?: NewOptionsType,14+ ): ExecaSubprocess<OptionsType & NewOptionsType>;15+16+ <NewOptionsType extends Options = {}>(17+ scriptPath: string | URL,18+ options?: NewOptionsType,19+ ): ExecaSubprocess<OptionsType & NewOptionsType>;20+};21+22+/**23+Same as `execa()` but using the `node: true` option.24+Executes a Node.js file using `node scriptPath ...arguments`.25+26+Just like `execa()`, this can use the template string syntax or bind options.27+28+This is the preferred method when executing Node.js files.29+30+@param scriptPath - Node.js script to execute, as a string or file URL31+@param arguments - Arguments to pass to `scriptPath` on execution.32+@returns An `ExecaSubprocess` that is both:33+- a `Promise` resolving or rejecting with a subprocess `result`.34+- a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.35+@throws A subprocess `result` error36+37+@example38+```39+import {execaNode} from 'execa';40+41+await execaNode('scriptPath', ['argument']);42+```43+*/44+export declare const execaNode: ExecaNode<{}>;added:types/methods/script.d.ts+80 added
1+import type {CommonOptions, Options, SyncOptions, StricterOptions} from '../arguments/options';2+import type {ExecaSyncResult} from '../return/result';3+import type {ExecaSubprocess} from '../subprocess/subprocess';4+import type {TemplateString} from './template';5+6+type ExecaScriptCommon<OptionsType extends CommonOptions> = {7+ <NewOptionsType extends CommonOptions = {}>(options: NewOptionsType): ExecaScript<OptionsType & NewOptionsType>;8+9+ (...templateString: TemplateString): ExecaSubprocess<StricterOptions<OptionsType, Options>>;10+11+ <NewOptionsType extends Options = {}>(12+ file: string | URL,13+ arguments?: readonly string[],14+ options?: NewOptionsType,15+ ): ExecaSubprocess<OptionsType & NewOptionsType>;16+17+ <NewOptionsType extends Options = {}>(18+ file: string | URL,19+ options?: NewOptionsType,20+ ): ExecaSubprocess<OptionsType & NewOptionsType>;21+};22+23+type ExecaScriptSync<OptionsType extends CommonOptions> = {24+ <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaScriptSync<OptionsType & NewOptionsType>;25+26+ (...templateString: TemplateString): ExecaSyncResult<StricterOptions<OptionsType, SyncOptions>>;27+28+ <NewOptionsType extends SyncOptions = {}>(29+ file: string | URL,30+ arguments?: readonly string[],31+ options?: NewOptionsType,32+ ): ExecaSyncResult<OptionsType & NewOptionsType>;33+34+ <NewOptionsType extends SyncOptions = {}>(35+ file: string | URL,36+ options?: NewOptionsType,37+ ): ExecaSyncResult<OptionsType & NewOptionsType>;38+};39+40+type ExecaScript<OptionsType extends CommonOptions> = {41+ sync: ExecaScriptSync<OptionsType>;42+ s: ExecaScriptSync<OptionsType>;43+} & ExecaScriptCommon<OptionsType>;44+45+/**46+Same as `execa()` but using the `stdin: 'inherit'` and `preferLocal: true` options.47+48+Just like `execa()`, this can use the template string syntax or bind options. It can also be run synchronously using `$.sync()` or `$.s()`.49+50+This is the preferred method when executing multiple commands in a script file.51+52+@returns An `ExecaSubprocess` that is both:53+ - a `Promise` resolving or rejecting with a subprocess `result`.54+ - a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.55+@throws A subprocess `result` error56+57+@example <caption>Basic</caption>58+```59+import {$} from 'execa';60+61+const branch = await $`git branch --show-current`;62+await $`dep deploy --branch=${branch}`;63+```64+65+@example <caption>Verbose mode</caption>66+```67+> node file.js68+unicorns69+rainbows70+71+> NODE_DEBUG=execa node file.js72+[19:49:00.360] [0] $ echo unicorns73+unicorns74+[19:49:00.383] [0] √ (done in 23ms)75+[19:49:00.383] [1] $ echo rainbows76+rainbows77+[19:49:00.404] [1] √ (done in 21ms)78+```79+*/80+export const $: ExecaScript<{}>;added:types/methods/template.d.ts+14 added
1+import type {CommonResultInstance} from '../return/result';2+3+// Values allowed inside `...${...}...` template syntax4+export type TemplateExpression =5+ | string6+ | number7+ | CommonResultInstance8+ | ReadonlyArray<string | number | CommonResultInstance>;9+10+// `...${...}...` template syntax11+export type TemplateString = readonly [TemplateStringsArray, ...readonly TemplateExpression[]];12+13+// `...${...}...` template syntax, but only allowing a single argument, for `execaCommand()`14+export type SimpleTemplateString = readonly [TemplateStringsArray, string?];added:types/return/final-error.d.ts+52 added
1+import type {CommonOptions, Options, SyncOptions} from '../arguments/options';2+// eslint-disable-next-line import/extensions3+import {CommonResult} from './result';4+5+declare abstract class CommonError<6+ IsSync extends boolean = boolean,7+ OptionsType extends CommonOptions = CommonOptions,8+> extends CommonResult<IsSync, OptionsType> {9+ readonly name: NonNullable<CommonResult['name']>;10+ message: NonNullable<CommonResult['message']>;11+ stack: NonNullable<CommonResult['stack']>;12+ shortMessage: NonNullable<CommonResult['shortMessage']>;13+ originalMessage: NonNullable<CommonResult['originalMessage']>;14+}15+16+// `result.*` defined only on failure, i.e. on `error.*`17+export type ErrorProperties =18+ | 'name'19+ | 'message'20+ | 'stack'21+ | 'cause'22+ | 'shortMessage'23+ | 'originalMessage'24+ | 'code';25+26+/**27+Exception thrown when the subprocess fails, either:28+- its exit code is not `0`29+- it was terminated with a signal, including `subprocess.kill()`30+- timing out31+- being canceled32+- there's not enough memory or there are already too many subprocesses33+34+This has the same shape as successful results, with a few additional properties.35+*/36+export class ExecaError<OptionsType extends Options = Options> extends CommonError<false, OptionsType> {37+ readonly name: 'ExecaError';38+}39+40+/**41+Exception thrown when the subprocess fails, either:42+- its exit code is not `0`43+- it was terminated with a signal, including `.kill()`44+- timing out45+- being canceled46+- there's not enough memory or there are already too many subprocesses47+48+This has the same shape as successful results, with a few additional properties.49+*/50+export class ExecaSyncError<OptionsType extends SyncOptions = SyncOptions> extends CommonError<true, OptionsType> {51+ readonly name: 'ExecaSyncError';52+}added:types/return/ignore.ts+26 added
1+import type {NoStreamStdioOption, StdioOptionCommon} from '../stdio/type';2+import type {IsInputFd} from '../stdio/direction';3+import type {FdStdioOption} from '../stdio/option';4+import type {FdSpecificOption} from '../arguments/specific';5+import type {CommonOptions} from '../arguments/options';6+7+// Whether `result.stdin|stdout|stderr|all|stdio[*]` is `undefined`8+export type IgnoresResultOutput<9+ FdNumber extends string,10+ OptionsType extends CommonOptions = CommonOptions,11+> = FdSpecificOption<OptionsType['buffer'], FdNumber> extends false12+ ? true13+ : IsInputFd<FdNumber, OptionsType> extends true14+ ? true15+ : IgnoresSubprocessOutput<FdNumber, OptionsType>;16+17+// Whether `subprocess.stdout|stderr|all` is `undefined|null`18+export type IgnoresSubprocessOutput<19+ FdNumber extends string,20+ OptionsType extends CommonOptions = CommonOptions,21+> = IgnoresOutput<FdNumber, FdStdioOption<FdNumber, OptionsType>>;22+23+type IgnoresOutput<24+ FdNumber extends string,25+ StdioOptionType extends StdioOptionCommon,26+> = StdioOptionType extends NoStreamStdioOption<FdNumber> ? true : false;added:types/return/result-all.d.ts+30 added
1+import type {IsObjectFd} from '../transform/object-mode';2+import type {CommonOptions} from '../arguments/options';3+import type {FdSpecificOption} from '../arguments/specific';4+import type {IgnoresResultOutput} from './ignore';5+import type {ResultStdio} from './result-stdout';6+7+// `result.all`8+export type ResultAll<OptionsType extends CommonOptions = CommonOptions> =9+ ResultAllProperty<OptionsType['all'], OptionsType>;10+11+type ResultAllProperty<12+ AllOption extends CommonOptions['all'] = CommonOptions['all'],13+ OptionsType extends CommonOptions = CommonOptions,14+> = AllOption extends true15+ ? ResultStdio<16+ AllMainFd<OptionsType>,17+ AllObjectFd<OptionsType>,18+ AllLinesFd<OptionsType>,19+ OptionsType20+ >21+ : undefined;22+23+type AllMainFd<OptionsType extends CommonOptions = CommonOptions> =24+ IgnoresResultOutput<'1', OptionsType> extends true ? '2' : '1';25+26+type AllObjectFd<OptionsType extends CommonOptions = CommonOptions> =27+ IsObjectFd<'1', OptionsType> extends true ? '1' : '2';28+29+type AllLinesFd<OptionsType extends CommonOptions = CommonOptions> =30+ FdSpecificOption<OptionsType['lines'], '1'> extends true ? '1' : '2';added:types/return/result-stdio.d.ts+18 added
1+import type {StdioOptionsArray} from '../stdio/type';2+import type {StdioOptionNormalizedArray} from '../stdio/array';3+import type {CommonOptions} from '../arguments/options';4+import type {ResultStdioNotAll} from './result-stdout';5+6+// `result.stdio`7+export type ResultStdioArray<OptionsType extends CommonOptions = CommonOptions> =8+ MapResultStdio<StdioOptionNormalizedArray<OptionsType>, OptionsType>;9+10+type MapResultStdio<11+ StdioOptionsArrayType extends StdioOptionsArray,12+ OptionsType extends CommonOptions = CommonOptions,13+> = {14+ -readonly [FdNumber in keyof StdioOptionsArrayType]: ResultStdioNotAll<15+ FdNumber extends string ? FdNumber : string,16+ OptionsType17+ >18+};added:types/return/result-stdout.d.ts+50 added
1+import type {BufferEncodingOption, BinaryEncodingOption} from '../arguments/encoding-option';2+import type {IsObjectFd} from '../transform/object-mode';3+import type {FdSpecificOption} from '../arguments/specific';4+import type {CommonOptions} from '../arguments/options';5+import type {IgnoresResultOutput} from './ignore';6+7+// `result.stdout|stderr|stdio`8+export type ResultStdioNotAll<9+ FdNumber extends string,10+ OptionsType extends CommonOptions = CommonOptions,11+> = ResultStdio<FdNumber, FdNumber, FdNumber, OptionsType>;12+13+// `result.stdout|stderr|stdio|all`14+export type ResultStdio<15+ MainFdNumber extends string,16+ ObjectFdNumber extends string,17+ LinesFdNumber extends string,18+ OptionsType extends CommonOptions = CommonOptions,19+> = ResultStdioProperty<20+ObjectFdNumber,21+LinesFdNumber,22+IgnoresResultOutput<MainFdNumber, OptionsType>,23+OptionsType24+>;25+26+type ResultStdioProperty<27+ ObjectFdNumber extends string,28+ LinesFdNumber extends string,29+ StreamOutputIgnored extends boolean,30+ OptionsType extends CommonOptions = CommonOptions,31+> = StreamOutputIgnored extends true32+ ? undefined33+ : ResultStdioItem<34+ IsObjectFd<ObjectFdNumber, OptionsType>,35+ FdSpecificOption<OptionsType['lines'], LinesFdNumber>,36+ OptionsType['encoding']37+ >;38+39+type ResultStdioItem<40+ IsObjectResult extends boolean,41+ LinesOption extends boolean | undefined,42+ Encoding extends CommonOptions['encoding'],43+> = IsObjectResult extends true ? unknown[]44+ : Encoding extends BufferEncodingOption45+ ? Uint8Array46+ : LinesOption extends true47+ ? Encoding extends BinaryEncodingOption48+ ? string49+ : string[]50+ : string;added:types/return/result.d.ts+190 added
1+import type {Unless} from '../utils';2+import type {CommonOptions, Options, SyncOptions} from '../arguments/options';3+import type {ErrorProperties} from './final-error';4+import type {ResultAll} from './result-all';5+import type {ResultStdioArray} from './result-stdio';6+import type {ResultStdioNotAll} from './result-stdout';7+8+export declare abstract class CommonResult<9+ IsSync extends boolean = boolean,10+ OptionsType extends CommonOptions = CommonOptions,11+> {12+ /**13+ The file and arguments that were run, for logging purposes.14+15+ This is not escaped and should not be executed directly as a subprocess, including using `execa()` or `execaCommand()`.16+ */17+ command: string;18+19+ /**20+ Same as `command` but escaped.21+22+ Unlike `command`, control characters are escaped, which makes it safe to print in a terminal.23+24+ This can also be copied and pasted into a shell, for debugging purposes.25+ Since the escaping is fairly basic, this should not be executed directly as a subprocess, including using `execa()` or `execaCommand()`.26+ */27+ escapedCommand: string;28+29+ /**30+ The numeric exit code of the subprocess that was run.31+32+ This is `undefined` when the subprocess could not be spawned or was terminated by a signal.33+ */34+ exitCode?: number;35+36+ /**37+ The output of the subprocess on `stdout`.38+39+ This is `undefined` if the `stdout` option is set to only `'inherit'`, `'ignore'`, `Writable` or `integer`. This is an array if the `lines` option is `true`, or if the `stdout` option is a transform in object mode.40+ */41+ stdout: ResultStdioNotAll<'1', OptionsType>;42+43+ /**44+ The output of the subprocess on `stderr`.45+46+ This is `undefined` if the `stderr` option is set to only `'inherit'`, `'ignore'`, `Writable` or `integer`. This is an array if the `lines` option is `true`, or if the `stderr` option is a transform in object mode.47+ */48+ stderr: ResultStdioNotAll<'2', OptionsType>;49+50+ /**51+ The output of the subprocess on `stdin`, `stdout`, `stderr` and other file descriptors.52+53+ Items are `undefined` when their corresponding `stdio` option is set to only `'inherit'`, `'ignore'`, `Writable` or `integer`. Items are arrays when their corresponding `stdio` option is a transform in object mode.54+ */55+ stdio: ResultStdioArray<OptionsType>;56+57+ /**58+ Whether the subprocess failed to run.59+ */60+ failed: boolean;61+62+ /**63+ Whether the subprocess timed out.64+ */65+ timedOut: boolean;66+67+ /**68+ Whether the subprocess was terminated by a signal (like `SIGTERM`) sent by either:69+ - The current process.70+ - Another process. This case is [not supported on Windows](https://nodejs.org/api/process.html#signal-events).71+ */72+ isTerminated: boolean;73+74+ /**75+ The name of the signal (like `SIGTERM`) that terminated the subprocess, sent by either:76+ - The current process.77+ - Another process. This case is [not supported on Windows](https://nodejs.org/api/process.html#signal-events).78+79+ If a signal terminated the subprocess, this property is defined and included in the error message. Otherwise it is `undefined`.80+ */81+ signal?: string;82+83+ /**84+ A human-friendly description of the signal that was used to terminate the subprocess. For example, `Floating point arithmetic error`.85+86+ If a signal terminated the subprocess, this property is defined and included in the error message. Otherwise it is `undefined`. It is also `undefined` when the signal is very uncommon which should seldomly happen.87+ */88+ signalDescription?: string;89+90+ /**91+ The current directory in which the command was run.92+ */93+ cwd: string;94+95+ /**96+ Duration of the subprocess, in milliseconds.97+ */98+ durationMs: number;99+100+ /**101+ Whether the subprocess was canceled using the `cancelSignal` option.102+ */103+ isCanceled: boolean;104+105+ /**106+ Whether the subprocess failed because its output was larger than the `maxBuffer` option.107+ */108+ isMaxBuffer: boolean;109+110+ /**111+ The output of the subprocess with `result.stdout` and `result.stderr` interleaved.112+113+ This is `undefined` if either:114+ - the `all` option is `false` (default value).115+ - both `stdout` and `stderr` options are set to `'inherit'`, `'ignore'`, `Writable` or `integer`.116+117+ This is an array if the `lines` option is `true`, or if either the `stdout` or `stderr` option is a transform in object mode.118+ */119+ all: ResultAll<OptionsType>;120+121+ /**122+ Results of the other subprocesses that were piped into this subprocess. This is useful to inspect a series of subprocesses piped with each other.123+124+ This array is initially empty and is populated each time the `subprocess.pipe()` method resolves.125+ */126+ pipedFrom: Unless<IsSync, ExecaResult[], []>;127+128+ /**129+ Error message when the subprocess failed to run. In addition to the underlying error message, it also contains some information related to why the subprocess errored.130+131+ The subprocess `stderr`, `stdout` and other file descriptors' output are appended to the end, separated with newlines and not interleaved.132+ */133+ message?: string;134+135+ /**136+ This is the same as the `message` property except it does not include the subprocess `stdout`/`stderr`/`stdio`.137+ */138+ shortMessage?: string;139+140+ /**141+ Original error message. This is the same as the `message` property excluding the subprocess `stdout`/`stderr`/`stdio` and some additional information added by Execa.142+143+ This exists only if the subprocess exited due to an `error` event or a timeout.144+ */145+ originalMessage?: string;146+147+ /**148+ Underlying error, if there is one. For example, this is set by `subprocess.kill(error)`.149+150+ This is usually an `Error` instance.151+ */152+ cause?: unknown;153+154+ /**155+ Node.js-specific [error code](https://nodejs.org/api/errors.html#errorcode), when available.156+ */157+ code?: string;158+159+ // We cannot `extend Error` because `message` must be optional. So we copy its types here.160+ readonly name?: Error['name'];161+ stack?: Error['stack'];162+}163+164+export type CommonResultInstance<165+ IsSync extends boolean = boolean,166+ OptionsType extends CommonOptions = CommonOptions,167+> = InstanceType<typeof CommonResult<IsSync, OptionsType>>;168+169+type SuccessResult<170+ IsSync extends boolean = boolean,171+ OptionsType extends CommonOptions = CommonOptions,172+> = CommonResultInstance<IsSync, OptionsType> & OmitErrorIfReject<OptionsType['reject']>;173+174+type OmitErrorIfReject<RejectOption extends CommonOptions['reject']> = RejectOption extends false175+ ? {}176+ : {[ErrorProperty in ErrorProperties]: never};177+178+/**179+Result of a subprocess execution.180+181+When the subprocess fails, it is rejected with an `ExecaError` instead.182+*/183+export type ExecaResult<OptionsType extends Options = Options> = SuccessResult<false, OptionsType>;184+185+/**186+Result of a subprocess execution.187+188+When the subprocess fails, it is rejected with an `ExecaError` instead.189+*/190+export type ExecaSyncResult<OptionsType extends SyncOptions = SyncOptions> = SuccessResult<true, OptionsType>;added:types/stdio/array.d.ts+16 added
1+import type {CommonOptions} from '../arguments/options';2+import type {StdinOptionCommon, StdoutStderrOptionCommon, StdioOptionsArray} from './type';3+4+// `options.stdio`, normalized as an array5+export type StdioOptionNormalizedArray<OptionsType extends CommonOptions = CommonOptions> = StdioOptionNormalized<OptionsType['stdio']>;6+7+type StdioOptionNormalized<StdioOption extends CommonOptions['stdio'] = CommonOptions['stdio']> = StdioOption extends StdioOptionsArray8+ ? StdioOption9+ : StdioOption extends StdinOptionCommon10+ ? StdioOption extends StdoutStderrOptionCommon11+ ? readonly [StdioOption, StdioOption, StdioOption]12+ : DefaultStdioOption13+ : DefaultStdioOption;14+15+// `options.stdio` default value16+type DefaultStdioOption = readonly ['pipe', 'pipe', 'pipe'];added:types/stdio/direction.d.ts+18 added
1+import type {CommonOptions} from '../arguments/options';2+import type {StdinOptionCommon, StdoutStderrOptionCommon, StdioOptionCommon} from './type';3+import type {FdStdioArrayOption} from './option';4+5+// Whether `result.stdio[FdNumber]` is an input stream6+export type IsInputFd<7+ FdNumber extends string,8+ OptionsType extends CommonOptions = CommonOptions,9+> = FdNumber extends '0'10+ ? true11+ : IsInputDescriptor<FdStdioArrayOption<FdNumber, OptionsType>>;12+13+// Whether `result.stdio[3+]` is an input stream14+type IsInputDescriptor<StdioOptionType extends StdioOptionCommon> = StdioOptionType extends StdinOptionCommon15+ ? StdioOptionType extends StdoutStderrOptionCommon16+ ? false17+ : true18+ : false;added:types/stdio/option.d.ts+35 added
1+import type {CommonOptions} from '../arguments/options';2+import type {StdioOptionNormalizedArray} from './array';3+import type {StandardStreams, StdioOptionCommon, StdioOptionsArray, StdioOptionsProperty} from './type';4+5+// `options.stdin|stdout|stderr|stdio` for a given file descriptor6+export type FdStdioOption<7+ FdNumber extends string,8+ OptionsType extends CommonOptions = CommonOptions,9+> = string extends FdNumber ? StdioOptionCommon10+ : FdNumber extends keyof StandardStreams11+ ? StandardStreams[FdNumber] extends keyof OptionsType12+ ? OptionsType[StandardStreams[FdNumber]] extends undefined13+ ? FdStdioArrayOption<FdNumber, OptionsType>14+ : OptionsType[StandardStreams[FdNumber]]15+ : FdStdioArrayOption<FdNumber, OptionsType>16+ : FdStdioArrayOption<FdNumber, OptionsType>;17+18+// `options.stdio[FdNumber]`, excluding `options.stdin|stdout|stderr`19+export type FdStdioArrayOption<20+ FdNumber extends string,21+ OptionsType extends CommonOptions = CommonOptions,22+> = FdStdioArrayOptionProperty<FdNumber, StdioOptionNormalizedArray<OptionsType>>;23+24+type FdStdioArrayOptionProperty<25+ FdNumber extends string,26+ StdioOptionsType extends StdioOptionsProperty,27+> = string extends FdNumber28+ ? StdioOptionCommon | undefined29+ : StdioOptionsType extends StdioOptionsArray30+ ? FdNumber extends keyof StdioOptionsType31+ ? StdioOptionsType[FdNumber]32+ : StdioOptionNormalizedArray extends StdioOptionsType33+ ? StdioOptionsType[number]34+ : undefined35+ : undefined;added:types/stdio/type.d.ts+158 added
1+import type {Readable, Writable} from 'node:stream';2+import type {Not, And, Or, Unless, AndUnless} from '../utils';3+import type {GeneratorTransform, GeneratorTransformFull, DuplexTransform, WebTransform} from '../transform/normalize';4+5+type IsStandardStream<FdNumber extends string> = FdNumber extends keyof StandardStreams ? true : false;6+7+export type StandardStreams = ['stdin', 'stdout', 'stderr'];8+9+// When `options.stdin|stdout|stderr|stdio` is set to one of those values, no stream is created10+export type NoStreamStdioOption<FdNumber extends string> =11+ | 'ignore'12+ | 'inherit'13+ | 'ipc'14+ | number15+ | Readable16+ | Writable17+ | Unless<IsStandardStream<FdNumber>, undefined>18+ | readonly [NoStreamStdioOption<FdNumber>];19+20+// `options.stdio` when it is not an array21+type SimpleStdioOption<22+ IsSync extends boolean,23+ IsExtra extends boolean,24+ IsArray extends boolean,25+> =26+ | undefined27+ | 'pipe'28+ | Unless<And<And<Not<IsSync>, IsArray>, IsExtra>, 'inherit'>29+ | Unless<IsArray, 'ignore'>30+ | Unless<IsSync, 'overlapped'>;31+32+// Values available in both `options.stdin|stdio` and `options.stdout|stderr|stdio`33+type CommonStdioOption<34+ IsSync extends boolean,35+ IsExtra extends boolean,36+ IsArray extends boolean,37+> =38+ | SimpleStdioOption<IsSync, IsExtra, IsArray>39+ | URL40+ | {file: string}41+ | GeneratorTransform<IsSync>42+ | GeneratorTransformFull<IsSync>43+ | Unless<And<Not<IsSync>, IsArray>, 3 | 4 | 5 | 6 | 7 | 8 | 9>44+ | Unless<Or<IsSync, IsArray>, 'ipc'>45+ | Unless<IsSync, DuplexTransform | WebTransform | TransformStream>;46+47+// Synchronous iterables excluding strings, Uint8Arrays and Arrays48+type IterableObject<IsArray extends boolean> = Iterable<unknown>49+& object50+& {readonly BYTES_PER_ELEMENT?: never}51+& AndUnless<IsArray, {readonly lastIndexOf?: never}>;52+53+// `process.stdin|stdout|stderr` are `Duplex` with a `fd` property.54+// This ensures they can only be passed to `stdin`/`stdout`/`stderr`, based on their direction.55+type ProcessStdinFd = {readonly fd?: 0};56+type ProcessStdoutStderrFd = {readonly fd?: 1 | 2};57+58+// Values available only in `options.stdin|stdio`59+type InputStdioOption<60+ IsSync extends boolean,61+ IsExtra extends boolean,62+ IsArray extends boolean,63+> =64+ | 065+ | Unless<And<IsSync, IsExtra>, Uint8Array | IterableObject<IsArray>>66+ | Unless<And<IsSync, IsArray>, Readable & ProcessStdinFd>67+ | Unless<IsSync, (AsyncIterable<unknown> & ProcessStdinFd) | ReadableStream>;68+69+// Values available only in `options.stdout|stderr|stdio`70+type OutputStdioOption<71+ IsSync extends boolean,72+ IsArray extends boolean,73+> =74+ | 175+ | 276+ | Unless<And<IsSync, IsArray>, Writable & ProcessStdoutStderrFd>77+ | Unless<IsSync, WritableStream>;78+79+// `options.stdin` array items80+type StdinSingleOption<81+ IsSync extends boolean = boolean,82+ IsExtra extends boolean = boolean,83+ IsArray extends boolean = boolean,84+> =85+ | CommonStdioOption<IsSync, IsExtra, IsArray>86+ | InputStdioOption<IsSync, IsExtra, IsArray>;87+88+// `options.stdin`89+export type StdinOptionCommon<90+ IsSync extends boolean = boolean,91+ IsExtra extends boolean = boolean,92+> =93+ | StdinSingleOption<IsSync, IsExtra, false>94+ | ReadonlyArray<StdinSingleOption<IsSync, IsExtra, true>>;95+96+// `options.stdin`, async97+export type StdinOption = StdinOptionCommon<false, false>;98+// `options.stdin`, sync99+export type StdinOptionSync = StdinOptionCommon<true, false>;100+101+// `options.stdout|stderr` array items102+type StdoutStderrSingleOption<103+ IsSync extends boolean = boolean,104+ IsExtra extends boolean = boolean,105+ IsArray extends boolean = boolean,106+> =107+ | CommonStdioOption<IsSync, IsExtra, IsArray>108+ | OutputStdioOption<IsSync, IsArray>;109+110+// `options.stdout|stderr`111+export type StdoutStderrOptionCommon<112+ IsSync extends boolean = boolean,113+ IsExtra extends boolean = boolean,114+> =115+ | StdoutStderrSingleOption<IsSync, IsExtra, false>116+ | ReadonlyArray<StdoutStderrSingleOption<IsSync, IsExtra, true>>;117+118+// `options.stdout|stderr`, async119+export type StdoutStderrOption = StdoutStderrOptionCommon<false, false>;120+// `options.stdout|stderr`, sync121+export type StdoutStderrOptionSync = StdoutStderrOptionCommon<true, false>;122+123+// `options.stdio[3+]`124+type StdioExtraOptionCommon<IsSync extends boolean = boolean> =125+ | StdinOptionCommon<IsSync, true>126+ | StdoutStderrOptionCommon<IsSync, true>;127+128+// `options.stdin|stdout|stderr|stdio` array items129+export type StdioSingleOption<130+ IsSync extends boolean = boolean,131+ IsExtra extends boolean = boolean,132+ IsArray extends boolean = boolean,133+> =134+ | StdinSingleOption<IsSync, IsExtra, IsArray>135+ | StdoutStderrSingleOption<IsSync, IsExtra, IsArray>;136+137+// `options.stdin|stdout|stderr|stdio`138+export type StdioOptionCommon<IsSync extends boolean = boolean> =139+ | StdinOptionCommon<IsSync>140+ | StdoutStderrOptionCommon<IsSync>;141+142+// `options.stdin|stdout|stderr|stdio`, async143+export type StdioOption = StdioOptionCommon<false>;144+// `options.stdin|stdout|stderr|stdio`, sync145+export type StdioOptionSync = StdioOptionCommon<true>;146+147+// `options.stdio` when it is an array148+export type StdioOptionsArray<IsSync extends boolean = boolean> = readonly [149+ StdinOptionCommon<IsSync, false>,150+ StdoutStderrOptionCommon<IsSync, false>,151+ StdoutStderrOptionCommon<IsSync, false>,152+ ...ReadonlyArray<StdioExtraOptionCommon<IsSync>>,153+];154+155+// `options.stdio`156+export type StdioOptionsProperty<IsSync extends boolean = boolean> =157+ | SimpleStdioOption<IsSync, false, false>158+ | StdioOptionsArray<IsSync>;added:types/subprocess/all.d.ts+24 added
1+import type {Readable} from 'node:stream';2+import type {IgnoresSubprocessOutput} from '../return/ignore';3+import type {Options} from '../arguments/options';4+5+// `subprocess.all`6+export type SubprocessAll<OptionsType extends Options = Options> = AllStream<OptionsType['all'], OptionsType>;7+8+type AllStream<9+ AllOption extends Options['all'] = Options['all'],10+ OptionsType extends Options = Options,11+> = AllOption extends true12+ ? AllIfStdout<IgnoresSubprocessOutput<'1', OptionsType>, OptionsType>13+ : undefined;14+15+type AllIfStdout<16+ StdoutResultIgnored extends boolean,17+ OptionsType extends Options = Options,18+> = StdoutResultIgnored extends true19+ ? AllIfStderr<IgnoresSubprocessOutput<'2', OptionsType>>20+ : Readable;21+22+type AllIfStderr<StderrResultIgnored extends boolean> = StderrResultIgnored extends true23+ ? undefined24+ : Readable;added:types/subprocess/stdio.d.ts+19 added
1+import type {StdioOptionNormalizedArray} from '../stdio/array';2+import type {StdioOptionsArray} from '../stdio/type';3+import type {Options} from '../arguments/options';4+import type {SubprocessStdioStream} from './stdout';5+6+// `subprocess.stdio`7+export type SubprocessStdioArray<OptionsType extends Options = Options> = MapStdioStreams<StdioOptionNormalizedArray<OptionsType>, OptionsType>;8+9+// We cannot use mapped types because it must be compatible with Node.js `ChildProcess["stdio"]` which uses a tuple with exactly 5 items10+type MapStdioStreams<11+ StdioOptionsArrayType extends StdioOptionsArray,12+ OptionsType extends Options = Options,13+> = [14+ SubprocessStdioStream<'0', OptionsType>,15+ SubprocessStdioStream<'1', OptionsType>,16+ SubprocessStdioStream<'2', OptionsType>,17+ '3' extends keyof StdioOptionsArrayType ? SubprocessStdioStream<'3', OptionsType> : never,18+ '4' extends keyof StdioOptionsArrayType ? SubprocessStdioStream<'4', OptionsType> : never,19+];added:types/subprocess/stdout.d.ts+22 added
1+import type {Readable, Writable} from 'node:stream';2+import type {IsInputFd} from '../stdio/direction';3+import type {IgnoresSubprocessOutput} from '../return/ignore';4+import type {Options} from '../arguments/options';5+6+// `subprocess.stdin|stdout|stderr|stdio`7+type SubprocessStdioStream<8+ FdNumber extends string,9+ OptionsType extends Options = Options,10+> = SubprocessStream<FdNumber, IgnoresSubprocessOutput<FdNumber, OptionsType>, OptionsType>;11+12+type SubprocessStream<13+ FdNumber extends string,14+ StreamResultIgnored extends boolean,15+ OptionsType extends Options = Options,16+> = StreamResultIgnored extends true17+ ? null18+ : InputOutputStream<IsInputFd<FdNumber, OptionsType>>;19+20+type InputOutputStream<IsInput extends boolean> = IsInput extends true21+ ? Writable22+ : Readable;added:types/subprocess/subprocess.d.ts+139 added
1+import type {ChildProcess} from 'node:child_process';2+import type {Readable, Writable, Duplex} from 'node:stream';3+import type {StdioOptionsArray} from '../stdio/type';4+import type {Options} from '../arguments/options';5+import type {ExecaResult} from '../return/result';6+import type {PipableSubprocess} from '../pipe';7+import type {ReadableOptions, WritableOptions, DuplexOptions, SubprocessAsyncIterable} from '../convert';8+import type {SubprocessStdioStream} from './stdout';9+import type {SubprocessStdioArray} from './stdio';10+import type {SubprocessAll} from './all';11+12+type HasIpc<OptionsType extends Options> = OptionsType['ipc'] extends true13+ ? true14+ : OptionsType['stdio'] extends StdioOptionsArray15+ ? 'ipc' extends OptionsType['stdio'][number] ? true : false16+ : false;17+18+export type ExecaResultPromise<OptionsType extends Options = Options> = {19+ /**20+ Process identifier ([PID](https://en.wikipedia.org/wiki/Process_identifier)).21+22+ This is `undefined` if the subprocess failed to spawn.23+ */24+ pid?: number;25+26+ /**27+ Send a `message` to the subprocess. The type of `message` depends on the `serialization` option.28+ The subprocess receives it as a [`message` event](https://nodejs.org/api/process.html#event-message).29+30+ This returns `true` on success.31+32+ This requires the `ipc` option to be `true`.33+34+ [More info.](https://nodejs.org/api/child_process.html#subprocesssendmessage-sendhandle-options-callback)35+ */36+ send: HasIpc<OptionsType> extends true ? ChildProcess['send'] : undefined;37+38+ /**39+ The subprocess `stdin` as a stream.40+41+ This is `null` if the `stdin` option is set to `'inherit'`, `'ignore'`, `Readable` or `integer`.42+43+ This is intended for advanced cases. Please consider using the `stdin` option, `input` option, `inputFile` option, or `subprocess.pipe()` instead.44+ */45+ stdin: SubprocessStdioStream<'0', OptionsType>;46+47+ /**48+ The subprocess `stdout` as a stream.49+50+ This is `null` if the `stdout` option is set to `'inherit'`, `'ignore'`, `Writable` or `integer`.51+52+ This is intended for advanced cases. Please consider using `result.stdout`, the `stdout` option, `subprocess.iterable()`, or `subprocess.pipe()` instead.53+ */54+ stdout: SubprocessStdioStream<'1', OptionsType>;55+56+ /**57+ The subprocess `stderr` as a stream.58+59+ This is `null` if the `stderr` option is set to `'inherit'`, `'ignore'`, `Writable` or `integer`.60+61+ This is intended for advanced cases. Please consider using `result.stderr`, the `stderr` option, `subprocess.iterable()`, or `subprocess.pipe()` instead.62+ */63+ stderr: SubprocessStdioStream<'2', OptionsType>;64+65+ /**66+ Stream combining/interleaving `subprocess.stdout` and `subprocess.stderr`.67+68+ This is `undefined` if either:69+ - the `all` option is `false` (the default value).70+ - both `stdout` and `stderr` options are set to `'inherit'`, `'ignore'`, `Writable` or `integer`.71+72+ This is intended for advanced cases. Please consider using `result.all`, the `stdout`/`stderr` option, `subprocess.iterable()`, or `subprocess.pipe()` instead.73+ */74+ all: SubprocessAll<OptionsType>;75+76+ /**77+ The subprocess `stdin`, `stdout`, `stderr` and other files descriptors as an array of streams.78+79+ Each array item is `null` if the corresponding `stdin`, `stdout`, `stderr` or `stdio` option is set to `'inherit'`, `'ignore'`, `Stream` or `integer`.80+81+ This is intended for advanced cases. Please consider using `result.stdio`, the `stdio` option, `subprocess.iterable()` or `subprocess.pipe()` instead.82+ */83+ stdio: SubprocessStdioArray<OptionsType>;84+85+ /**86+ Sends a [signal](https://nodejs.org/api/os.html#signal-constants) to the subprocess. The default signal is the `killSignal` option. `killSignal` defaults to `SIGTERM`, which terminates the subprocess.87+88+ This returns `false` when the signal could not be sent, for example when the subprocess has already exited.89+90+ When an error is passed as argument, it is set to the subprocess' `error.cause`. The subprocess is then terminated with the default signal. This does not emit the [`error` event](https://nodejs.org/api/child_process.html#event-error).91+92+ [More info.](https://nodejs.org/api/child_process.html#subprocesskillsignal)93+ */94+ kill(signal: Parameters<ChildProcess['kill']>[0], error?: Error): ReturnType<ChildProcess['kill']>;95+ kill(error?: Error): ReturnType<ChildProcess['kill']>;96+97+ /**98+ Subprocesses are [async iterables](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator). They iterate over each output line.99+100+ The iteration waits for the subprocess to end. It throws if the subprocess fails. This means you do not need to `await` the subprocess' promise.101+ */102+ [Symbol.asyncIterator](): SubprocessAsyncIterable<undefined, OptionsType['encoding']>;103+104+ /**105+ Same as `subprocess[Symbol.asyncIterator]` except options can be provided.106+ */107+ iterable<IterableOptions extends ReadableOptions = {}>(readableOptions?: IterableOptions): SubprocessAsyncIterable<IterableOptions['binary'], OptionsType['encoding']>;108+109+ /**110+ Converts the subprocess to a readable stream.111+112+ Unlike `subprocess.stdout`, the stream waits for the subprocess to end and emits an [`error`](https://nodejs.org/api/stream.html#event-error) event if the subprocess fails. This means you do not need to `await` the subprocess' promise. On the other hand, you do need to handle to the stream `error` event. This can be done by using [`await finished(stream)`](https://nodejs.org/api/stream.html#streamfinishedstream-options), [`await pipeline(..., stream)`](https://nodejs.org/api/stream.html#streampipelinesource-transforms-destination-options) or [`await text(stream)`](https://nodejs.org/api/webstreams.html#streamconsumerstextstream) which throw an exception when the stream errors.113+114+ Before using this method, please first consider the `stdin`/`stdout`/`stderr`/`stdio` options, `subprocess.pipe()` or `subprocess.iterable()`.115+ */116+ readable(readableOptions?: ReadableOptions): Readable;117+118+ /**119+ Converts the subprocess to a writable stream.120+121+ Unlike `subprocess.stdin`, the stream waits for the subprocess to end and emits an [`error`](https://nodejs.org/api/stream.html#event-error) event if the subprocess fails. This means you do not need to `await` the subprocess' promise. On the other hand, you do need to handle to the stream `error` event. This can be done by using [`await finished(stream)`](https://nodejs.org/api/stream.html#streamfinishedstream-options) or [`await pipeline(stream, ...)`](https://nodejs.org/api/stream.html#streampipelinesource-transforms-destination-options) which throw an exception when the stream errors.122+123+ Before using this method, please first consider the `stdin`/`stdout`/`stderr`/`stdio` options or `subprocess.pipe()`.124+ */125+ writable(writableOptions?: WritableOptions): Writable;126+127+ /**128+ Converts the subprocess to a duplex stream.129+130+ The stream waits for the subprocess to end and emits an [`error`](https://nodejs.org/api/stream.html#event-error) event if the subprocess fails. This means you do not need to `await` the subprocess' promise. On the other hand, you do need to handle to the stream `error` event. This can be done by using [`await finished(stream)`](https://nodejs.org/api/stream.html#streamfinishedstream-options), [`await pipeline(..., stream, ...)`](https://nodejs.org/api/stream.html#streampipelinesource-transforms-destination-options) or [`await text(stream)`](https://nodejs.org/api/webstreams.html#streamconsumerstextstream) which throw an exception when the stream errors.131+132+ Before using this method, please first consider the `stdin`/`stdout`/`stderr`/`stdio` options, `subprocess.pipe()` or `subprocess.iterable()`.133+ */134+ duplex(duplexOptions?: DuplexOptions): Duplex;135+} & PipableSubprocess;136+137+export type ExecaSubprocess<OptionsType extends Options = Options> = Omit<ChildProcess, keyof ExecaResultPromise<OptionsType>> &138+ExecaResultPromise<OptionsType> &139+Promise<ExecaResult<OptionsType>>;added:types/transform/normalize.d.ts+56 added
1+import type {Duplex} from 'node:stream';2+import type {Unless} from '../utils';3+4+// `options.std*: Generator`5+// @todo Use `string`, `Uint8Array` or `unknown` for both the argument and the return type, based on whether `encoding: 'buffer'` and `objectMode: true` are used.6+// See https://github.com/sindresorhus/execa/issues/6947+export type GeneratorTransform<IsSync extends boolean> = (chunk: unknown) =>8+| Unless<IsSync, AsyncGenerator<unknown, void, void>>9+| Generator<unknown, void, void>;10+type GeneratorFinal<IsSync extends boolean> = () =>11+| Unless<IsSync, AsyncGenerator<unknown, void, void>>12+| Generator<unknown, void, void>;13+14+/**15+A transform or an array of transforms can be passed to the `stdin`, `stdout`, `stderr` or `stdio` option.16+17+A transform is either a generator function or a plain object with the following members.18+*/19+export type GeneratorTransformFull<IsSync extends boolean> = {20+ /**21+ Map or filter the input or output of the subprocess.22+ */23+ transform: GeneratorTransform<IsSync>;24+25+ /**26+ Create additional lines after the last one.27+ */28+ final?: GeneratorFinal<IsSync>;29+30+ /**31+ If `true`, iterate over arbitrary chunks of `Uint8Array`s instead of line `string`s.32+ */33+ binary?: boolean;34+35+ /**36+ If `true`, keep newlines in each `line` argument. Also, this allows multiple `yield`s to produces a single line.37+ */38+ preserveNewlines?: boolean;39+40+ /**41+ If `true`, allow `transformOptions.transform` and `transformOptions.final` to return any type, not just `string` or `Uint8Array`.42+ */43+ objectMode?: boolean;44+};45+46+// `options.std*: Duplex`47+export type DuplexTransform = {48+ transform: Duplex;49+ objectMode?: boolean;50+};51+52+// `options.std*: TransformStream`53+export type WebTransform = {54+ transform: TransformStream;55+ objectMode?: boolean;56+};added:types/transform/object-mode.d.ts+28 added
1+import type {StdioSingleOption, StdioOptionCommon} from '../stdio/type';2+import type {FdStdioOption} from '../stdio/option';3+import type {CommonOptions} from '../arguments/options';4+import type {GeneratorTransformFull, DuplexTransform, WebTransform} from './normalize';5+6+// Whether a file descriptor is in object mode7+// I.e. whether `result.stdout|stderr|stdio|all` is an array of `unknown` due to `objectMode: true`8+export type IsObjectFd<9+ FdNumber extends string,10+ OptionsType extends CommonOptions = CommonOptions,11+> = IsObjectStdioOption<FdStdioOption<FdNumber, OptionsType>>;12+13+type IsObjectStdioOption<StdioOptionType extends StdioOptionCommon> = IsObjectStdioSingleOption<StdioOptionType extends readonly StdioSingleOption[]14+ ? StdioOptionType[number]15+ : StdioOptionType16+>;17+18+type IsObjectStdioSingleOption<StdioSingleOptionType extends StdioSingleOption> = StdioSingleOptionType extends GeneratorTransformFull<boolean> | WebTransform19+ ? BooleanObjectMode<StdioSingleOptionType['objectMode']>20+ : StdioSingleOptionType extends DuplexTransform21+ ? DuplexObjectMode<StdioSingleOptionType>22+ : false;23+24+type BooleanObjectMode<ObjectModeOption extends boolean | undefined> = ObjectModeOption extends true ? true : false;25+26+type DuplexObjectMode<OutputOption extends DuplexTransform> = OutputOption['objectMode'] extends boolean27+ ? OutputOption['objectMode']28+ : OutputOption['transform']['readableObjectMode'];added:types/convert.d.ts+58 added
1+import type {BinaryEncodingOption} from './arguments/encoding-option';2+import type {Options} from './arguments/options';3+import type {FromOption, ToOption} from './arguments/fd-options';4+5+// `subprocess.readable|duplex|iterable()` options6+export type ReadableOptions = {7+ /**8+ Which stream to read from the subprocess. A file descriptor like `"fd3"` can also be passed.9+10+ `"all"` reads both `stdout` and `stderr`. This requires the `all` option to be `true`.11+12+ @default 'stdout'13+ */14+ readonly from?: FromOption;15+16+ /**17+ If `false`, the stream iterates over lines. Each line is a string. Also, the stream is in [object mode](https://nodejs.org/api/stream.html#object-mode).18+19+ If `true`, the stream iterates over arbitrary chunks of data. Each line is an `Uint8Array` (with `subprocess.iterable()`) or a [`Buffer`](https://nodejs.org/api/buffer.html#class-buffer) (otherwise).20+21+ This is always `true` when the `encoding` option is binary.22+23+ @default `false` with `subprocess.iterable()`, `true` otherwise24+ */25+ readonly binary?: boolean;26+27+ /**28+ If both this option and the `binary` option is `false`, newlines are stripped from each line.29+30+ @default `false` with `subprocess.iterable()`, `true` otherwise31+ */32+ readonly preserveNewlines?: boolean;33+};34+35+// `subprocess.writable|duplex()` options36+export type WritableOptions = {37+ /**38+ Which stream to write to the subprocess. A file descriptor like `"fd3"` can also be passed.39+40+ @default 'stdin'41+ */42+ readonly to?: ToOption;43+};44+45+// `subprocess.duplex()` options46+export type DuplexOptions = ReadableOptions & WritableOptions;47+48+// `subprocess.iterable()` return value49+export type SubprocessAsyncIterable<50+ BinaryOption extends boolean | undefined,51+ EncodingOption extends Options['encoding'],52+> = AsyncIterableIterator<53+EncodingOption extends BinaryEncodingOption54+ ? Uint8Array55+ : BinaryOption extends true56+ ? Uint8Array57+ : string58+>;added:types/pipe.d.ts+66 added
1+import type {Options} from './arguments/options';2+import type {ExecaResult} from './return/result';3+import type {FromOption, ToOption} from './arguments/fd-options';4+import type {ExecaSubprocess} from './subprocess/subprocess';5+import type {TemplateExpression} from './methods/template';6+7+// `subprocess.pipe()` options8+type PipeOptions = {9+ /**10+ Which stream to pipe from the source subprocess. A file descriptor like `"fd3"` can also be passed.11+12+ `"all"` pipes both `stdout` and `stderr`. This requires the `all` option to be `true`.13+ */14+ readonly from?: FromOption;15+16+ /**17+ Which stream to pipe to the destination subprocess. A file descriptor like `"fd3"` can also be passed.18+ */19+ readonly to?: ToOption;20+21+ /**22+ Unpipe the subprocess when the signal aborts.23+24+ The `subprocess.pipe()` method will be rejected with a cancellation error.25+ */26+ readonly unpipeSignal?: AbortSignal;27+};28+29+// `subprocess.pipe()`30+type PipableSubprocess = {31+ /**32+ [Pipe](https://nodejs.org/api/stream.html#readablepipedestination-options) the subprocess' `stdout` to a second Execa subprocess' `stdin`. This resolves with that second subprocess' result. If either subprocess is rejected, this is rejected with that subprocess' error instead.33+34+ This follows the same syntax as `execa(file, arguments?, options?)` except both regular options and pipe-specific options can be specified.35+36+ This can be called multiple times to chain a series of subprocesses.37+38+ Multiple subprocesses can be piped to the same subprocess. Conversely, the same subprocess can be piped to multiple other subprocesses.39+ */40+ pipe<OptionsType extends Options & PipeOptions = {}>(41+ file: string | URL,42+ arguments?: readonly string[],43+ options?: OptionsType,44+ ): Promise<ExecaResult<OptionsType>> & PipableSubprocess;45+ pipe<OptionsType extends Options & PipeOptions = {}>(46+ file: string | URL,47+ options?: OptionsType,48+ ): Promise<ExecaResult<OptionsType>> & PipableSubprocess;49+50+ /**51+ Like `subprocess.pipe(file, arguments?, options?)` but using a `command` template string instead. This follows the same syntax as `$`.52+ */53+ pipe(templates: TemplateStringsArray, ...expressions: readonly TemplateExpression[]):54+ Promise<ExecaResult<{}>> & PipableSubprocess;55+ pipe<OptionsType extends Options & PipeOptions = {}>(options: OptionsType):56+ (templates: TemplateStringsArray, ...expressions: readonly TemplateExpression[])57+ => Promise<ExecaResult<OptionsType>> & PipableSubprocess;58+59+ /**60+ Like `subprocess.pipe(file, arguments?, options?)` but using the return value of another `execa()` call instead.61+62+ This is the most advanced method to pipe subprocesses. It is useful in specific cases, such as piping multiple subprocesses to the same subprocess.63+ */64+ pipe<Destination extends ExecaSubprocess>(destination: Destination, options?: PipeOptions):65+ Promise<Awaited<Destination>> & PipableSubprocess;66+};added:types/utils.d.ts+9 added
1+export type Not<Value extends boolean> = Value extends true ? false : true;2+3+export type And<First extends boolean, Second extends boolean> = First extends true ? Second : false;4+5+export type Or<First extends boolean, Second extends boolean> = First extends true ? true : Second;6+7+export type Unless<Condition extends boolean, ThenValue, ElseValue = never> = Condition extends true ? ElseValue : ThenValue;8+9+export type AndUnless<Condition extends boolean, ThenValue, ElseValue = unknown> = Condition extends true ? ElseValue : ThenValue;modified:index.d.ts+12 added-1893 removed
1-import {type ChildProcess} from 'node:child_process';2-import {type Readable, type Writable, type Duplex} from 'node:stream';3-4-type Not<Value extends boolean> = Value extends true ? false : true;5-6-type And<First extends boolean, Second extends boolean> = First extends true ? Second : false;7-8-type Or<First extends boolean, Second extends boolean> = First extends true ? true : Second;9-10-type Unless<Condition extends boolean, ThenValue, ElseValue = never> = Condition extends true ? ElseValue : ThenValue;11-12-type AndUnless<Condition extends boolean, ThenValue, ElseValue = unknown> = Condition extends true ? ElseValue : ThenValue;13-14-type IsMainFd<FdNumber extends string> = FdNumber extends keyof StreamOptionsNames ? true : false;15-16-// When the `stdin`/`stdout`/`stderr`/`stdio` option is set to one of those values, no stream is created17-type NoStreamStdioOption<FdNumber extends string> =18- | 'ignore'19- | 'inherit'20- | 'ipc'21- | number22- | Readable23- | Writable24- | Unless<IsMainFd<FdNumber>, undefined>25- | readonly [NoStreamStdioOption<FdNumber>];26-27-type BaseStdioOption<28- IsSync extends boolean,29- IsExtra extends boolean,30- IsArray extends boolean,31-> =32- | 'pipe'33- | undefined34- | Unless<And<And<Not<IsSync>, IsArray>, IsExtra>, 'inherit'>35- | Unless<IsArray, 'ignore'>36- | Unless<IsSync, 'overlapped'>;37-38-// @todo Use `string`, `Uint8Array` or `unknown` for both the argument and the return type, based on whether `encoding: 'buffer'` and `objectMode: true` are used.39-// See https://github.com/sindresorhus/execa/issues/69440-type GeneratorTransform<IsSync extends boolean> = (chunk: unknown) =>41-| Unless<IsSync, AsyncGenerator<unknown, void, void>>42-| Generator<unknown, void, void>;43-type GeneratorFinal<IsSync extends boolean> = () =>44-| Unless<IsSync, AsyncGenerator<unknown, void, void>>45-| Generator<unknown, void, void>;46-47-/**48-A transform or an array of transforms can be passed to the `stdin`, `stdout`, `stderr` or `stdio` option.49-50-A transform is either a generator function or a plain object with the following members.51-*/52-type GeneratorTransformFull<IsSync extends boolean> = {53- /**54- Map or filter the input or output of the subprocess.55- */56- transform: GeneratorTransform<IsSync>;57-58- /**59- Create additional lines after the last one.60- */61- final?: GeneratorFinal<IsSync>;62-63- /**64- If `true`, iterate over arbitrary chunks of `Uint8Array`s instead of line `string`s.65- */66- binary?: boolean;67-68- /**69- If `true`, keep newlines in each `line` argument. Also, this allows multiple `yield`s to produces a single line.70- */71- preserveNewlines?: boolean;72-73- /**74- If `true`, allow `transformOptions.transform` and `transformOptions.final` to return any type, not just `string` or `Uint8Array`.75- */76- objectMode?: boolean;77-};78-79-type DuplexTransform = {80- transform: Duplex;81- objectMode?: boolean;82-};83-84-type WebTransform = {85- transform: TransformStream;86- objectMode?: boolean;87-};88-89-type CommonStdioOption<90- IsSync extends boolean,91- IsExtra extends boolean,92- IsArray extends boolean,93-> =94- | BaseStdioOption<IsSync, IsExtra, IsArray>95- | URL96- | {file: string}97- | GeneratorTransform<IsSync>98- | GeneratorTransformFull<IsSync>99- | Unless<And<Not<IsSync>, IsArray>, number>100- | Unless<Or<IsSync, IsArray>, 'ipc'>101- | Unless<IsSync, DuplexTransform | WebTransform | TransformStream>;102-103-// Synchronous iterables excluding strings, Uint8Arrays and Arrays104-type IterableObject<IsArray extends boolean> = Iterable<unknown>105-& object106-& {readonly BYTES_PER_ELEMENT?: never}107-& AndUnless<IsArray, {readonly lastIndexOf?: never}>;108-109-type InputStdioOption<110- IsSync extends boolean,111- IsExtra extends boolean,112- IsArray extends boolean,113-> =114- | 0115- | Unless<And<IsSync, IsExtra>, Uint8Array | IterableObject<IsArray>>116- | Unless<And<IsSync, IsArray>, Readable>117- | Unless<IsSync, AsyncIterable<unknown> | ReadableStream>;118-119-type OutputStdioOption<120- IsSync extends boolean,121- IsArray extends boolean,122-> =123- | 1124- | 2125- | Unless<And<IsSync, IsArray>, Writable>126- | Unless<IsSync, WritableStream>;127-128-type StdinSingleOption<129- IsSync extends boolean = boolean,130- IsExtra extends boolean = boolean,131- IsArray extends boolean = boolean,132-> =133- | CommonStdioOption<IsSync, IsExtra, IsArray>134- | InputStdioOption<IsSync, IsExtra, IsArray>;135-136-type StdinOptionCommon<137- IsSync extends boolean = boolean,138- IsExtra extends boolean = boolean,139-> =140- | StdinSingleOption<IsSync, IsExtra, false>141- | ReadonlyArray<StdinSingleOption<IsSync, IsExtra, true>>;142-143-export type StdinOption = StdinOptionCommon<false, false>;144-export type StdinOptionSync = StdinOptionCommon<true, false>;145-146-type StdoutStderrSingleOption<147- IsSync extends boolean = boolean,148- IsExtra extends boolean = boolean,149- IsArray extends boolean = boolean,150-> =151- | CommonStdioOption<IsSync, IsExtra, IsArray>152- | OutputStdioOption<IsSync, IsArray>;153-154-type StdoutStderrOptionCommon<155- IsSync extends boolean = boolean,156- IsExtra extends boolean = boolean,157-> =158- | StdoutStderrSingleOption<IsSync, IsExtra, false>159- | ReadonlyArray<StdoutStderrSingleOption<IsSync, IsExtra, true>>;160-161-export type StdoutStderrOption = StdoutStderrOptionCommon<false, false>;162-export type StdoutStderrOptionSync = StdoutStderrOptionCommon<true, false>;163-164-type StdioExtraOptionCommon<IsSync extends boolean = boolean> =165- | StdinOptionCommon<IsSync, true>166- | StdoutStderrOptionCommon<IsSync, true>;167-168-type StdioSingleOption<169- IsSync extends boolean = boolean,170- IsExtra extends boolean = boolean,171- IsArray extends boolean = boolean,172-> =173- | StdinSingleOption<IsSync, IsExtra, IsArray>174- | StdoutStderrSingleOption<IsSync, IsExtra, IsArray>;175-176-type StdioOptionCommon<IsSync extends boolean = boolean> =177- | StdinOptionCommon<IsSync>178- | StdoutStderrOptionCommon<IsSync>;179-180-export type StdioOption = StdioOptionCommon<false>;181-export type StdioOptionSync = StdioOptionCommon<true>;182-183-type StdioOptionsArray<IsSync extends boolean = boolean> = readonly [184- StdinOptionCommon<IsSync, false>,185- StdoutStderrOptionCommon<IsSync, false>,186- StdoutStderrOptionCommon<IsSync, false>,187- ...ReadonlyArray<StdioExtraOptionCommon<IsSync>>,188-];189-190-type StdioOptions<IsSync extends boolean = boolean> =191- | BaseStdioOption<IsSync, false, false>192- | StdioOptionsArray<IsSync>;193-194-type DefaultEncodingOption = 'utf8';195-type TextEncodingOption =196- | DefaultEncodingOption197- | 'utf16le';198-type BufferEncodingOption = 'buffer';199-type BinaryEncodingOption =200- | BufferEncodingOption201- | 'hex'202- | 'base64'203- | 'base64url'204- | 'latin1'205- | 'ascii';206-type EncodingOption =207- | TextEncodingOption208- | BinaryEncodingOption209- | undefined;210-211-// Whether `result.stdout|stderr|all` is an array of values due to `objectMode: true`212-type IsObjectStream<213- FdNumber extends string,214- OptionsType extends CommonOptions = CommonOptions,215-> = IsObjectOutputOptions<StreamOption<FdNumber, OptionsType>>;216-217-type IsObjectOutputOptions<OutputOptions extends StdioOptionCommon> = IsObjectOutputOption<OutputOptions extends readonly StdioSingleOption[]218- ? OutputOptions[number]219- : OutputOptions220->;221-222-type IsObjectOutputOption<OutputOption extends StdioSingleOption> = OutputOption extends GeneratorTransformFull<boolean> | WebTransform223- ? BooleanObjectMode<OutputOption['objectMode']>224- : OutputOption extends DuplexTransform225- ? DuplexObjectMode<OutputOption>226- : false;227-228-type BooleanObjectMode<ObjectModeOption extends boolean | undefined> = ObjectModeOption extends true ? true : false;229-230-type DuplexObjectMode<OutputOption extends DuplexTransform> = OutputOption['objectMode'] extends boolean231- ? OutputOption['objectMode']232- : OutputOption['transform']['readableObjectMode'];233-234-// Whether `result.stdout|stderr|all` is `undefined`, excluding the `buffer` option235-type IgnoresStreamResult<236- FdNumber extends string,237- OptionsType extends CommonOptions = CommonOptions,238-> = IgnoresStdioResult<FdNumber, StreamOption<FdNumber, OptionsType>>;239-240-// Whether `result.stdio[*]` is `undefined`241-type IgnoresStdioResult<242- FdNumber extends string,243- StdioOptionType extends StdioOptionCommon,244-> = StdioOptionType extends NoStreamStdioOption<FdNumber> ? true : false;245-246-// Whether `result.stdout|stderr|all` is `undefined`247-type IgnoresStreamOutput<248- FdNumber extends string,249- OptionsType extends CommonOptions = CommonOptions,250-> = LacksBuffer<FdSpecificOption<OptionsType['buffer'], FdNumber>> extends true251- ? true252- : IsInputStdioDescriptor<FdNumber, OptionsType> extends true253- ? true254- : IgnoresStreamResult<FdNumber, OptionsType>;255-256-type LacksBuffer<BufferOption extends boolean | undefined> = BufferOption extends false ? true : false;257-258-// Whether `result.stdio[FdNumber]` is an input stream259-type IsInputStdioDescriptor<260- FdNumber extends string,261- OptionsType extends CommonOptions = CommonOptions,262-> = FdNumber extends '0'263- ? true264- : IsInputStdio<StdioProperty<FdNumber, OptionsType>>;265-266-// Whether `result.stdio[3+]` is an input stream267-type IsInputStdio<StdioOptionType extends StdioOptionCommon> = StdioOptionType extends StdinOptionCommon268- ? StdioOptionType extends StdoutStderrOptionCommon269- ? false270- : true271- : false;272-273-// `options.stdin|stdout|stderr|stdio`274-type StreamOption<275- FdNumber extends string,276- OptionsType extends CommonOptions = CommonOptions,277-> = string extends FdNumber ? StdioOptionCommon278- : FdNumber extends keyof StreamOptionsNames279- ? StreamOptionsNames[FdNumber] extends keyof OptionsType280- ? OptionsType[StreamOptionsNames[FdNumber]] extends undefined281- ? StdioProperty<FdNumber, OptionsType>282- : OptionsType[StreamOptionsNames[FdNumber]]283- : StdioProperty<FdNumber, OptionsType>284- : StdioProperty<FdNumber, OptionsType>;285-286-type StreamOptionsNames = ['stdin', 'stdout', 'stderr'];287-288-// `options.stdio[FdNumber]`289-type StdioProperty<290- FdNumber extends string,291- OptionsType extends CommonOptions = CommonOptions,292-> = StdioOptionProperty<FdNumber, StdioArrayOption<OptionsType>>;293-294-type StdioOptionProperty<295- FdNumber extends string,296- StdioOptionsType extends StdioOptions,297-> = string extends FdNumber298- ? StdioOptionCommon | undefined299- : StdioOptionsType extends StdioOptionsArray300- ? FdNumber extends keyof StdioOptionsType301- ? StdioOptionsType[FdNumber]302- : StdioArrayOption extends StdioOptionsType303- ? StdioOptionsType[number]304- : undefined305- : undefined;306-307-// Type of `result.stdout|stderr`308-type NonAllStdioOutput<309- FdNumber extends string,310- OptionsType extends CommonOptions = CommonOptions,311-> = StdioOutput<FdNumber, FdNumber, FdNumber, OptionsType>;312-313-type StdioOutput<314- MainFdNumber extends string,315- ObjectFdNumber extends string,316- LinesFdNumber extends string,317- OptionsType extends CommonOptions = CommonOptions,318-> = StdioOutputResult<319-ObjectFdNumber,320-LinesFdNumber,321-IgnoresStreamOutput<MainFdNumber, OptionsType>,322-OptionsType323->;324-325-type StdioOutputResult<326- ObjectFdNumber extends string,327- LinesFdNumber extends string,328- StreamOutputIgnored extends boolean,329- OptionsType extends CommonOptions = CommonOptions,330-> = StreamOutputIgnored extends true331- ? undefined332- : StreamEncoding<333- IsObjectStream<ObjectFdNumber, OptionsType>,334- FdSpecificOption<OptionsType['lines'], LinesFdNumber>,335- OptionsType['encoding']336- >;337-338-type StreamEncoding<339- IsObjectResult extends boolean,340- LinesOption extends boolean | undefined,341- Encoding extends CommonOptions['encoding'],342-> = IsObjectResult extends true ? unknown[]343- : Encoding extends BufferEncodingOption344- ? Uint8Array345- : LinesOption extends true346- ? Encoding extends BinaryEncodingOption347- ? string348- : string[]349- : string;350-351-// Type of `result.all`352-type AllOutput<OptionsType extends CommonOptions = CommonOptions> = AllOutputProperty<OptionsType['all'], OptionsType>;353-354-type AllOutputProperty<355- AllOption extends CommonOptions['all'] = CommonOptions['all'],356- OptionsType extends CommonOptions = CommonOptions,357-> = AllOption extends true358- ? StdioOutput<359- AllMainFd<OptionsType>,360- AllObjectFd<OptionsType>,361- AllLinesFd<OptionsType>,362- OptionsType363- >364- : undefined;365-366-type AllMainFd<OptionsType extends CommonOptions = CommonOptions> = IgnoresStreamOutput<'1', OptionsType> extends true ? '2' : '1';367-368-type AllObjectFd<OptionsType extends CommonOptions = CommonOptions> = IsObjectStream<'1', OptionsType> extends true ? '1' : '2';369-370-type AllLinesFd<OptionsType extends CommonOptions = CommonOptions> = FdSpecificOption<OptionsType['lines'], '1'> extends true ? '1' : '2';371-372-// Type of `result.stdio`373-type StdioArrayOutput<OptionsType extends CommonOptions = CommonOptions> = MapStdioOptions<StdioArrayOption<OptionsType>, OptionsType>;374-375-type MapStdioOptions<376- StdioOptionsArrayType extends StdioOptionsArray,377- OptionsType extends CommonOptions = CommonOptions,378-> = {379- -readonly [FdNumber in keyof StdioOptionsArrayType]: NonAllStdioOutput<380- FdNumber extends string ? FdNumber : string,381- OptionsType382- >383-};384-385-// `stdio` option386-type StdioArrayOption<OptionsType extends CommonOptions = CommonOptions> = StdioArrayOptionValue<OptionsType['stdio']>;387-388-type StdioArrayOptionValue<StdioOption extends CommonOptions['stdio'] = CommonOptions['stdio']> = StdioOption extends StdioOptionsArray389- ? StdioOption390- : StdioOption extends StdinOptionCommon391- ? StdioOption extends StdoutStderrOptionCommon392- ? readonly [StdioOption, StdioOption, StdioOption]393- : DefaultStdio394- : DefaultStdio;395-396-type DefaultStdio = readonly ['pipe', 'pipe', 'pipe'];397-398-type StricterOptions<399- WideOptions extends CommonOptions,400- StrictOptions extends CommonOptions,401-> = WideOptions extends StrictOptions ? WideOptions : StrictOptions;402-403-// Options which can be fd-specific like `{verbose: {stdout: 'none', stderr: 'full'}}`404-type FdGenericOption<OptionType = unknown> = OptionType | GenericOptionObject<OptionType>;405-406-type GenericOptionObject<OptionType = unknown> = {407- readonly [FdName in FromOption]?: OptionType408-};409-410-// Retrieve fd-specific option's value411-type FdSpecificOption<412- GenericOption extends FdGenericOption,413- FdNumber extends string,414-> = GenericOption extends GenericOptionObject415- ? FdSpecificObjectOption<GenericOption, FdNumber>416- : GenericOption;417-418-type FdSpecificObjectOption<419- GenericOption extends GenericOptionObject,420- FdNumber extends string,421-> = keyof GenericOption extends FromOption422- ? FdNumberToFromOption<FdNumber, keyof GenericOption> extends never423- ? undefined424- : GenericOption[FdNumberToFromOption<FdNumber, keyof GenericOption>]425- : GenericOption;426-427-type FdNumberToFromOption<428- FdNumber extends string,429- FromOptions extends FromOption,430-> = FdNumber extends '1'431- ? 'stdout' extends FromOptions432- ? 'stdout'433- : 'fd1' extends FromOptions434- ? 'fd1'435- : 'all' extends FromOptions436- ? 'all'437- : never438- : FdNumber extends '2'439- ? 'stderr' extends FromOptions440- ? 'stderr'441- : 'fd2' extends FromOptions442- ? 'fd2'443- : 'all' extends FromOptions444- ? 'all'445- : never446- : `fd${FdNumber}` extends FromOptions447- ? `fd${FdNumber}`448- : never;449-450-type CommonOptions<IsSync extends boolean = boolean> = {451- /**452- Prefer locally installed binaries when looking for a binary to execute.453-454- If you `$ npm install foo`, you can then `execa('foo')`.455-456- @default `true` with `$`, `false` otherwise457- */458- readonly preferLocal?: boolean;459-460- /**461- Preferred path to find locally installed binaries in (use with `preferLocal`).462-463- @default process.cwd()464- */465- readonly localDir?: string | URL;466-467- /**468- If `true`, runs with Node.js. The first argument must be a Node.js file.469-470- @default `true` with `execaNode()`, `false` otherwise471- */472- readonly node?: boolean;473-474- /**475- Path to the Node.js executable.476-477- For example, this can be used together with [`get-node`](https://github.com/ehmicky/get-node) to run a specific Node.js version.478-479- Requires the `node` option to be `true`.480-481- @default [`process.execPath`](https://nodejs.org/api/process.html#process_process_execpath) (current Node.js executable)482- */483- readonly nodePath?: string | URL;484-485- /**486- List of [CLI options](https://nodejs.org/api/cli.html#cli_options) passed to the Node.js executable.487-488- Requires the `node` option to be `true`.489-490- @default [`process.execArgv`](https://nodejs.org/api/process.html#process_process_execargv) (current Node.js CLI options)491- */492- readonly nodeOptions?: readonly string[];493-494- /**495- Write some input to the subprocess' `stdin`.496-497- See also the `inputFile` and `stdin` options.498- */499- readonly input?: string | Uint8Array | Readable;500-501- /**502- Use a file as input to the subprocess' `stdin`.503-504- See also the `input` and `stdin` options.505- */506- readonly inputFile?: string | URL;507-508- /**509- How to setup the subprocess' standard input. This can be:510- - `'pipe'`: Sets `subprocess.stdin` stream.511- - `'overlapped'`: Like `'pipe'` but asynchronous on Windows.512- - `'ignore'`: Do not use `stdin`.513- - `'inherit'`: Re-use the current process' `stdin`.514- - an integer: Re-use a specific file descriptor from the current process.515- - a Node.js `Readable` stream.516- - `{ file: 'path' }` object.517- - a file URL.518- - a web [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).519- - an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) or an [`AsyncIterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols)520- - an `Uint8Array`.521-522- This can be an [array of values](https://github.com/sindresorhus/execa#redirect-stdinstdoutstderr-to-multiple-destinations) such as `['inherit', 'pipe']` or `[filePath, 'pipe']`.523-524- This can also be a generator function or a [`Duplex`](https://nodejs.org/api/stream.html#class-streamduplex) or a [web `TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) to transform the input. [Learn more.](https://github.com/sindresorhus/execa/tree/main/docs/transform.md)525-526- @default `inherit` with `$`, `pipe` otherwise527- */528- readonly stdin?: StdinOptionCommon<IsSync>;529-530- /**531- How to setup the subprocess' standard output. This can be:532- - `'pipe'`: Sets `result.stdout` (as a string or `Uint8Array`) and `subprocess.stdout` (as a stream).533- - `'overlapped'`: Like `'pipe'` but asynchronous on Windows.534- - `'ignore'`: Do not use `stdout`.535- - `'inherit'`: Re-use the current process' `stdout`.536- - an integer: Re-use a specific file descriptor from the current process.537- - a Node.js `Writable` stream.538- - `{ file: 'path' }` object.539- - a file URL.540- - a web [`WritableStream`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream).541-542- This can be an [array of values](https://github.com/sindresorhus/execa#redirect-stdinstdoutstderr-to-multiple-destinations) such as `['inherit', 'pipe']` or `[filePath, 'pipe']`.543-544- This can also be a generator function or a [`Duplex`](https://nodejs.org/api/stream.html#class-streamduplex) or a [web `TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) to transform the output. [Learn more.](https://github.com/sindresorhus/execa/tree/main/docs/transform.md)545-546- @default 'pipe'547- */548- readonly stdout?: StdoutStderrOptionCommon<IsSync>;549-550- /**551- How to setup the subprocess' standard error. This can be:552- - `'pipe'`: Sets `result.stderr` (as a string or `Uint8Array`) and `subprocess.stderr` (as a stream).553- - `'overlapped'`: Like `'pipe'` but asynchronous on Windows.554- - `'ignore'`: Do not use `stderr`.555- - `'inherit'`: Re-use the current process' `stderr`.556- - an integer: Re-use a specific file descriptor from the current process.557- - a Node.js `Writable` stream.558- - `{ file: 'path' }` object.559- - a file URL.560- - a web [`WritableStream`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStream).561-562- This can be an [array of values](https://github.com/sindresorhus/execa#redirect-stdinstdoutstderr-to-multiple-destinations) such as `['inherit', 'pipe']` or `[filePath, 'pipe']`.563-564- This can also be a generator function or a [`Duplex`](https://nodejs.org/api/stream.html#class-streamduplex) or a [web `TransformStream`](https://developer.mozilla.org/en-US/docs/Web/API/TransformStream) to transform the output. [Learn more.](https://github.com/sindresorhus/execa/tree/main/docs/transform.md)565-566- @default 'pipe'567- */568- readonly stderr?: StdoutStderrOptionCommon<IsSync>;569-570- /**571- Like the `stdin`, `stdout` and `stderr` options but for all file descriptors at once. For example, `{stdio: ['ignore', 'pipe', 'pipe']}` is the same as `{stdin: 'ignore', stdout: 'pipe', stderr: 'pipe'}`.572-573- A single string can be used as a shortcut. For example, `{stdio: 'pipe'}` is the same as `{stdin: 'pipe', stdout: 'pipe', stderr: 'pipe'}`.574-575- The array can have more than 3 items, to create additional file descriptors beyond `stdin`/`stdout`/`stderr`. For example, `{stdio: ['pipe', 'pipe', 'pipe', 'pipe']}` sets a fourth file descriptor.576-577- @default 'pipe'578- */579- readonly stdio?: StdioOptions<IsSync>;580-581- /**582- Set `result.stdout`, `result.stderr`, `result.all` and `result.stdio` as arrays of strings, splitting the subprocess' output into lines.583-584- This cannot be used if the `encoding` option is binary.585-586- By default, this applies to both `stdout` and `stderr`, but different values can also be passed.587-588- @default false589- */590- readonly lines?: FdGenericOption<boolean>;591-592- /**593- Setting this to `false` resolves the promise with the error instead of rejecting it.594-595- @default true596- */597- readonly reject?: boolean;598-599- /**600- Strip the final [newline character](https://en.wikipedia.org/wiki/Newline) from the output.601-602- If the `lines` option is true, this applies to each output line instead.603-604- By default, this applies to both `stdout` and `stderr`, but different values can also be passed.605-606- @default true607- */608- readonly stripFinalNewline?: FdGenericOption<boolean>;609-610- /**611- If `true`, the subprocess uses both the `env` option and the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).612- If `false`, only the `env` option is used, not `process.env`.613-614- @default true615- */616- readonly extendEnv?: boolean;617-618- /**619- Current working directory of the subprocess.620-621- This is also used to resolve the `nodePath` option when it is a relative path.622-623- @default process.cwd()624- */625- readonly cwd?: string | URL;626-627- /**628- Environment key-value pairs.629-630- Unless the `extendEnv` option is `false`, the subprocess also uses the current process' environment variables ([`process.env`](https://nodejs.org/api/process.html#processenv)).631-632- @default process.env633- */634- readonly env?: NodeJS.ProcessEnv;635-636- /**637- Explicitly set the value of `argv[0]` sent to the subprocess. This will be set to `command` or `file` if not specified.638- */639- readonly argv0?: string;640-641- /**642- Sets the user identity of the subprocess.643- */644- readonly uid?: number;645-646- /**647- Sets the group identity of the subprocess.648- */649- readonly gid?: number;650-651- /**652- If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.653-654- We recommend against using this option since it is:655- - not cross-platform, encouraging shell-specific syntax.656- - slower, because of the additional shell interpretation.657- - unsafe, potentially allowing command injection.658-659- @default false660- */661- readonly shell?: boolean | string | URL;662-663- /**664- If the subprocess outputs text, specifies its character encoding, either `'utf8'` or `'utf16le'`.665-666- If it outputs binary data instead, this should be either:667- - `'buffer'`: returns the binary output as an `Uint8Array`.668- - `'hex'`, `'base64'`, `'base64url'`, [`'latin1'`](https://nodejs.org/api/buffer.html#buffers-and-character-encodings) or [`'ascii'`](https://nodejs.org/api/buffer.html#buffers-and-character-encodings): encodes the binary output as a string.669-670- The output is available with `result.stdout`, `result.stderr` and `result.stdio`.671-672- @default 'utf8'673- */674- readonly encoding?: EncodingOption;675-676- /**677- If `timeout` is greater than `0`, the subprocess will be terminated if it runs for longer than that amount of milliseconds.678-679- @default 0680- */681- readonly timeout?: number;682-683- /**684- Largest amount of data allowed on `stdout`, `stderr` and `stdio`.685-686- When this threshold is hit, the subprocess fails and `error.isMaxBuffer` becomes `true`.687-688- This is measured:689- - By default: in [characters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length).690- - If the `encoding` option is `'buffer'`: in bytes.691- - If the `lines` option is `true`: in lines.692- - If a transform in object mode is used: in objects.693-694- By default, this applies to both `stdout` and `stderr`, but different values can also be passed.695-696- @default 100_000_000697- */698- readonly maxBuffer?: FdGenericOption<number>;699-700- /**701- Signal used to terminate the subprocess when:702- - using the `cancelSignal`, `timeout`, `maxBuffer` or `cleanup` option703- - calling `subprocess.kill()` with no arguments704-705- This can be either a name (like `"SIGTERM"`) or a number (like `9`).706-707- @default 'SIGTERM'708- */709- readonly killSignal?: string | number;710-711- /**712- If the subprocess is terminated but does not exit, forcefully exit it by sending [`SIGKILL`](https://en.wikipedia.org/wiki/Signal_(IPC)#SIGKILL).713-714- The grace period is 5 seconds by default. This feature can be disabled with `false`.715-716- This works when the subprocess is terminated by either:717- - the `cancelSignal`, `timeout`, `maxBuffer` or `cleanup` option718- - calling `subprocess.kill()` with no arguments719-720- This does not work when the subprocess is terminated by either:721- - calling `subprocess.kill()` with an argument722- - calling [`process.kill(subprocess.pid)`](https://nodejs.org/api/process.html#processkillpid-signal)723- - sending a termination signal from another process724-725- Also, this does not work on Windows, because Windows [doesn't support signals](https://nodejs.org/api/process.html#process_signal_events): `SIGKILL` and `SIGTERM` both terminate the subprocess immediately. Other packages (such as [`taskkill`](https://github.com/sindresorhus/taskkill)) can be used to achieve fail-safe termination on Windows.726-727- @default 5000728- */729- forceKillAfterDelay?: Unless<IsSync, number | false>;730-731- /**732- If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`.733-734- @default false735- */736- readonly windowsVerbatimArguments?: boolean;737-738- /**739- On Windows, do not create a new console window. Please note this also prevents `CTRL-C` [from working](https://github.com/nodejs/node/issues/29837) on Windows.740-741- @default true742- */743- readonly windowsHide?: boolean;744-745- /**746- If `verbose` is `'short'` or `'full'`, prints each command on `stderr` before executing it. When the command completes, prints its duration and (if it failed) its error.747-748- If `verbose` is `'full'`, the command's `stdout` and `stderr` are printed too, unless either:749- - the `stdout`/`stderr` option is `ignore` or `inherit`.750- - the `stdout`/`stderr` is redirected to [a stream](https://nodejs.org/api/stream.html#readablepipedestination-options), a file, a file descriptor, or another subprocess.751- - the `encoding` option is binary.752-753- This can also be set to `'full'` by setting the `NODE_DEBUG=execa` environment variable in the current process.754-755- By default, this applies to both `stdout` and `stderr`, but different values can also be passed.756-757- @default 'none'758- */759- readonly verbose?: FdGenericOption<'none' | 'short' | 'full'>;760-761- /**762- Kill the subprocess when the current process exits unless either:763- - the subprocess is `detached`.764- - the current process is terminated abruptly, for example, with `SIGKILL` as opposed to `SIGTERM` or a normal exit.765-766- @default true767- */768- readonly cleanup?: Unless<IsSync, boolean>;769-770- /**771- Whether to return the subprocess' output using the `result.stdout`, `result.stderr`, `result.all` and `result.stdio` properties.772-773- On failure, the `error.stdout`, `error.stderr`, `error.all` and `error.stdio` properties are used instead.774-775- When `buffer` is `false`, the output can still be read using the `subprocess.stdout`, `subprocess.stderr`, `subprocess.stdio` and `subprocess.all` streams. If the output is read, this should be done right away to avoid missing any data.776-777- By default, this applies to both `stdout` and `stderr`, but different values can also be passed.778-779- @default true780- */781- readonly buffer?: FdGenericOption<boolean>;782-783- /**784- Add a `subprocess.all` stream and a `result.all` property. They contain the combined/[interleaved](#ensuring-all-output-is-interleaved) output of the subprocess' `stdout` and `stderr`.785-786- @default false787- */788- readonly all?: boolean;789-790- /**791- Enables exchanging messages with the subprocess using `subprocess.send(message)` and `subprocess.on('message', (message) => {})`.792-793- @default `true` if the `node` option is enabled, `false` otherwise794- */795- readonly ipc?: Unless<IsSync, boolean>;796-797- /**798- Specify the kind of serialization used for sending messages between subprocesses when using the `ipc` option:799- - `json`: Uses `JSON.stringify()` and `JSON.parse()`.800- - `advanced`: Uses [`v8.serialize()`](https://nodejs.org/api/v8.html#v8_v8_serialize_value)801-802- [More info.](https://nodejs.org/api/child_process.html#child_process_advanced_serialization)803-804- @default 'advanced'805- */806- readonly serialization?: Unless<IsSync, 'json' | 'advanced'>;807-808- /**809- Prepare subprocess to run independently of the current process. Specific behavior depends on the platform.810-811- @default false812- */813- readonly detached?: Unless<IsSync, boolean>;814-815- /**816- You can abort the subprocess using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).817-818- When `AbortController.abort()` is called, `result.isCanceled` becomes `true`.819-820- @example821- ```822- import {execa} from 'execa';823-824- const abortController = new AbortController();825- const subprocess = execa('node', [], {cancelSignal: abortController.signal});826-827- setTimeout(() => {828- abortController.abort();829- }, 1000);830-831- try {832- await subprocess;833- } catch (error) {834- console.log(error.isTerminated); // true835- console.log(error.isCanceled); // true836- }837- ```838- */839- readonly cancelSignal?: Unless<IsSync, AbortSignal>;840-};841-842-/**843-Subprocess options.844-845-Some options are related to the subprocess output: `verbose`, `lines`, `stripFinalNewline`, `buffer`, `maxBuffer`. By default, those options apply to all file descriptors (`stdout`, `stderr`, etc.). A plain object can be passed instead to apply them to only `stdout`, `stderr`, `fd3`, etc.846-847-@example848-849-```850-await execa('./run.js', {verbose: 'full'}) // Same value for stdout and stderr851-await execa('./run.js', {verbose: {stdout: 'none', stderr: 'full'}}) // Different values852-```853-*/854-export type Options = CommonOptions<false>;855-856-/**857-Subprocess options, with synchronous methods.858-859-Some options are related to the subprocess output: `verbose`, `lines`, `stripFinalNewline`, `buffer`, `maxBuffer`. By default, those options apply to all file descriptors (`stdout`, `stderr`, etc.). A plain object can be passed instead to apply them to only `stdout`, `stderr`, `fd3`, etc.860-861-@example862-863-```864-execaSync('./run.js', {verbose: 'full'}) // Same value for stdout and stderr865-execaSync('./run.js', {verbose: {stdout: 'none', stderr: 'full'}}) // Different values866-```867-*/868-export type SyncOptions = CommonOptions<true>;869-870-declare abstract class CommonResult<871- IsSync extends boolean = boolean,872- OptionsType extends CommonOptions = CommonOptions,873-> {874- /**875- The file and arguments that were run, for logging purposes.876-877- This is not escaped and should not be executed directly as a subprocess, including using `execa()` or `execaCommand()`.878- */879- command: string;880-881- /**882- Same as `command` but escaped.883-884- Unlike `command`, control characters are escaped, which makes it safe to print in a terminal.885-886- This can also be copied and pasted into a shell, for debugging purposes.887- Since the escaping is fairly basic, this should not be executed directly as a subprocess, including using `execa()` or `execaCommand()`.888- */889- escapedCommand: string;890-891- /**892- The numeric exit code of the subprocess that was run.893-894- This is `undefined` when the subprocess could not be spawned or was terminated by a signal.895- */896- exitCode?: number;897-898- /**899- The output of the subprocess on `stdout`.900-901- This is `undefined` if the `stdout` option is set to only `'inherit'`, `'ignore'`, `Writable` or `integer`. This is an array if the `lines` option is `true`, or if the `stdout` option is a transform in object mode.902- */903- stdout: NonAllStdioOutput<'1', OptionsType>;904-905- /**906- The output of the subprocess on `stderr`.907-908- This is `undefined` if the `stderr` option is set to only `'inherit'`, `'ignore'`, `Writable` or `integer`. This is an array if the `lines` option is `true`, or if the `stderr` option is a transform in object mode.909- */910- stderr: NonAllStdioOutput<'2', OptionsType>;911-912- /**913- The output of the subprocess on `stdin`, `stdout`, `stderr` and other file descriptors.914-915- Items are `undefined` when their corresponding `stdio` option is set to only `'inherit'`, `'ignore'`, `Writable` or `integer`. Items are arrays when their corresponding `stdio` option is a transform in object mode.916- */917- stdio: StdioArrayOutput<OptionsType>;918-919- /**920- Whether the subprocess failed to run.921- */922- failed: boolean;923-924- /**925- Whether the subprocess timed out.926- */927- timedOut: boolean;928-929- /**930- Whether the subprocess was terminated by a signal (like `SIGTERM`) sent by either:931- - The current process.932- - Another process. This case is [not supported on Windows](https://nodejs.org/api/process.html#signal-events).933- */934- isTerminated: boolean;935-936- /**937- The name of the signal (like `SIGTERM`) that terminated the subprocess, sent by either:938- - The current process.939- - Another process. This case is [not supported on Windows](https://nodejs.org/api/process.html#signal-events).940-941- If a signal terminated the subprocess, this property is defined and included in the error message. Otherwise it is `undefined`.942- */943- signal?: string;944-945- /**946- A human-friendly description of the signal that was used to terminate the subprocess. For example, `Floating point arithmetic error`.947-948- If a signal terminated the subprocess, this property is defined and included in the error message. Otherwise it is `undefined`. It is also `undefined` when the signal is very uncommon which should seldomly happen.949- */950- signalDescription?: string;951-952- /**953- The current directory in which the command was run.954- */955- cwd: string;956-957- /**958- Duration of the subprocess, in milliseconds.959- */960- durationMs: number;961-962- /**963- Whether the subprocess was canceled using the `cancelSignal` option.964- */965- isCanceled: boolean;966-967- /**968- Whether the subprocess failed because its output was larger than the `maxBuffer` option.969- */970- isMaxBuffer: boolean;971-972- /**973- The output of the subprocess with `result.stdout` and `result.stderr` interleaved.974-975- This is `undefined` if either:976- - the `all` option is `false` (default value).977- - both `stdout` and `stderr` options are set to `'inherit'`, `'ignore'`, `Writable` or `integer`.978-979- This is an array if the `lines` option is `true`, or if either the `stdout` or `stderr` option is a transform in object mode.980- */981- all: AllOutput<OptionsType>;982-983- /**984- Results of the other subprocesses that were piped into this subprocess. This is useful to inspect a series of subprocesses piped with each other.985-986- This array is initially empty and is populated each time the `subprocess.pipe()` method resolves.987- */988- pipedFrom: Unless<IsSync, ExecaResult[], []>;989-990- /**991- Error message when the subprocess failed to run. In addition to the underlying error message, it also contains some information related to why the subprocess errored.992-993- The subprocess `stderr`, `stdout` and other file descriptors' output are appended to the end, separated with newlines and not interleaved.994- */995- message?: string;996-997- /**998- This is the same as the `message` property except it does not include the subprocess `stdout`/`stderr`/`stdio`.999- */1000- shortMessage?: string;1001-1002- /**1003- Original error message. This is the same as the `message` property excluding the subprocess `stdout`/`stderr`/`stdio` and some additional information added by Execa.1004-1005- This exists only if the subprocess exited due to an `error` event or a timeout.1006- */1007- originalMessage?: string;1008-1009- /**1010- Underlying error, if there is one. For example, this is set by `subprocess.kill(error)`.1011-1012- This is usually an `Error` instance.1013- */1014- cause?: unknown;1015-1016- /**1017- Node.js-specific [error code](https://nodejs.org/api/errors.html#errorcode), when available.1018- */1019- code?: string;1020-1021- // We cannot `extend Error` because `message` must be optional. So we copy its types here.1022- readonly name?: Error['name'];1023- stack?: Error['stack'];1024-}1025-1026-type CommonResultInstance<1027- IsSync extends boolean = boolean,1028- OptionsType extends CommonOptions = CommonOptions,1029-> = InstanceType<typeof CommonResult<IsSync, OptionsType>>;1030-1031-type SuccessResult<1032- IsSync extends boolean = boolean,1033- OptionsType extends CommonOptions = CommonOptions,1034-> = CommonResultInstance<IsSync, OptionsType> & OmitErrorIfReject<OptionsType['reject']>;1035-1036-type OmitErrorIfReject<RejectOption extends CommonOptions['reject']> = RejectOption extends false1037- ? {}1038- : {[ErrorProperty in ErrorProperties]: never};1039-1040-type ErrorProperties =1041- | 'name'1042- | 'message'1043- | 'stack'1044- | 'cause'1045- | 'shortMessage'1046- | 'originalMessage'1047- | 'code';1048-1049-/**1050-Result of a subprocess execution.1051-1052-When the subprocess fails, it is rejected with an `ExecaError` instead.1053-*/1054-export type ExecaResult<OptionsType extends Options = Options> = SuccessResult<false, OptionsType>;1055-1056-/**1057-Result of a subprocess execution.1058-1059-When the subprocess fails, it is rejected with an `ExecaError` instead.1060-*/1061-export type ExecaSyncResult<OptionsType extends SyncOptions = SyncOptions> = SuccessResult<true, OptionsType>;1062-1063-declare abstract class CommonError<1064- IsSync extends boolean = boolean,1065- OptionsType extends CommonOptions = CommonOptions,1066-> extends CommonResult<IsSync, OptionsType> {1067- readonly name: NonNullable<CommonResult['name']>;1068- message: NonNullable<CommonResult['message']>;1069- stack: NonNullable<CommonResult['stack']>;1070- shortMessage: NonNullable<CommonResult['shortMessage']>;1071- originalMessage: NonNullable<CommonResult['originalMessage']>;1072-}1073-1074-/**1075-Exception thrown when the subprocess fails, either:1076-- its exit code is not `0`1077-- it was terminated with a signal, including `subprocess.kill()`1078-- timing out1079-- being canceled1080-- there's not enough memory or there are already too many subprocesses1081-1082-This has the same shape as successful results, with a few additional properties.1083-*/1084-export class ExecaError<OptionsType extends Options = Options> extends CommonError<false, OptionsType> {1085- readonly name: 'ExecaError';1086-}1087-1088-/**1089-Exception thrown when the subprocess fails, either:1090-- its exit code is not `0`1091-- it was terminated with a signal, including `.kill()`1092-- timing out1093-- being canceled1094-- there's not enough memory or there are already too many subprocesses1095-1096-This has the same shape as successful results, with a few additional properties.1097-*/1098-export class ExecaSyncError<OptionsType extends SyncOptions = SyncOptions> extends CommonError<true, OptionsType> {1099- readonly name: 'ExecaSyncError';1100-}1101-1102-type StreamUnlessIgnored<1103- FdNumber extends string,1104- OptionsType extends Options = Options,1105-> = SubprocessStream<FdNumber, IgnoresStreamResult<FdNumber, OptionsType>, OptionsType>;1106-1107-type SubprocessStream<1108- FdNumber extends string,1109- StreamResultIgnored extends boolean,1110- OptionsType extends Options = Options,1111-> = StreamResultIgnored extends true1112- ? null1113- : InputOutputStream<IsInputStdioDescriptor<FdNumber, OptionsType>>;1114-1115-// Type of `subprocess.stdio`1116-type StdioArrayStreams<OptionsType extends Options = Options> = MapStdioStreams<StdioArrayOption<OptionsType>, OptionsType>;1117-1118-// We cannot use mapped types because it must be compatible with Node.js `ChildProcess["stdio"]` which uses a tuple with exactly 5 items1119-type MapStdioStreams<1120- StdioOptionsArrayType extends StdioOptionsArray,1121- OptionsType extends Options = Options,1122-> = [1123- StreamUnlessIgnored<'0', OptionsType>,1124- StreamUnlessIgnored<'1', OptionsType>,1125- StreamUnlessIgnored<'2', OptionsType>,1126- '3' extends keyof StdioOptionsArrayType ? StreamUnlessIgnored<'3', OptionsType> : never,1127- '4' extends keyof StdioOptionsArrayType ? StreamUnlessIgnored<'4', OptionsType> : never,1128-];1129-1130-type InputOutputStream<IsInput extends boolean> = IsInput extends true1131- ? Writable1132- : Readable;1133-1134-type AllStream<OptionsType extends Options = Options> = AllStreamProperty<OptionsType['all'], OptionsType>;1135-1136-type AllStreamProperty<1137- AllOption extends Options['all'] = Options['all'],1138- OptionsType extends Options = Options,1139-> = AllOption extends true1140- ? AllIfStdout<IgnoresStreamResult<'1', OptionsType>, OptionsType>1141- : undefined;1142-1143-type AllIfStdout<1144- StdoutResultIgnored extends boolean,1145- OptionsType extends Options = Options,1146-> = StdoutResultIgnored extends true1147- ? AllIfStderr<IgnoresStreamResult<'2', OptionsType>>1148- : Readable;1149-1150-type AllIfStderr<StderrResultIgnored extends boolean> = StderrResultIgnored extends true1151- ? undefined1152- : Readable;1153-1154-type FileDescriptorOption = `fd${number}`;1155-type FromOption = 'stdout' | 'stderr' | 'all' | FileDescriptorOption;1156-type ToOption = 'stdin' | FileDescriptorOption;1157-1158-type PipeOptions = {1159- /**1160- Which stream to pipe from the source subprocess. A file descriptor like `"fd3"` can also be passed.1161-1162- `"all"` pipes both `stdout` and `stderr`. This requires the `all` option to be `true`.1163- */1164- readonly from?: FromOption;1165-1166- /**1167- Which stream to pipe to the destination subprocess. A file descriptor like `"fd3"` can also be passed.1168- */1169- readonly to?: ToOption;1170-1171- /**1172- Unpipe the subprocess when the signal aborts.1173-1174- The `subprocess.pipe()` method will be rejected with a cancellation error.1175- */1176- readonly unpipeSignal?: AbortSignal;1177-};1178-1179-type PipableSubprocess = {1180- /**1181- [Pipe](https://nodejs.org/api/stream.html#readablepipedestination-options) the subprocess' `stdout` to a second Execa subprocess' `stdin`. This resolves with that second subprocess' result. If either subprocess is rejected, this is rejected with that subprocess' error instead.1182-1183- This follows the same syntax as `execa(file, arguments?, options?)` except both regular options and pipe-specific options can be specified.1184-1185- This can be called multiple times to chain a series of subprocesses.1186-1187- Multiple subprocesses can be piped to the same subprocess. Conversely, the same subprocess can be piped to multiple other subprocesses.1188- */1189- pipe<OptionsType extends Options & PipeOptions = {}>(1190- file: string | URL,1191- arguments?: readonly string[],1192- options?: OptionsType,1193- ): Promise<ExecaResult<OptionsType>> & PipableSubprocess;1194- pipe<OptionsType extends Options & PipeOptions = {}>(1195- file: string | URL,1196- options?: OptionsType,1197- ): Promise<ExecaResult<OptionsType>> & PipableSubprocess;1198-1199- /**1200- Like `subprocess.pipe(file, arguments?, options?)` but using a `command` template string instead. This follows the same syntax as `$`.1201- */1202- pipe(templates: TemplateStringsArray, ...expressions: readonly TemplateExpression[]):1203- Promise<ExecaResult<{}>> & PipableSubprocess;1204- pipe<OptionsType extends Options & PipeOptions = {}>(options: OptionsType):1205- (templates: TemplateStringsArray, ...expressions: readonly TemplateExpression[])1206- => Promise<ExecaResult<OptionsType>> & PipableSubprocess;1207-1208- /**1209- Like `subprocess.pipe(file, arguments?, options?)` but using the return value of another `execa()` call instead.1210-1211- This is the most advanced method to pipe subprocesses. It is useful in specific cases, such as piping multiple subprocesses to the same subprocess.1212- */1213- pipe<Destination extends ExecaSubprocess>(destination: Destination, options?: PipeOptions):1214- Promise<Awaited<Destination>> & PipableSubprocess;1215-};1216-1217-type ReadableOptions = {1218- /**1219- Which stream to read from the subprocess. A file descriptor like `"fd3"` can also be passed.1220-1221- `"all"` reads both `stdout` and `stderr`. This requires the `all` option to be `true`.1222-1223- @default 'stdout'1224- */1225- readonly from?: FromOption;1226-1227- /**1228- If `false`, the stream iterates over lines. Each line is a string. Also, the stream is in [object mode](https://nodejs.org/api/stream.html#object-mode).1229-1230- If `true`, the stream iterates over arbitrary chunks of data. Each line is an `Uint8Array` (with `subprocess.iterable()`) or a [`Buffer`](https://nodejs.org/api/buffer.html#class-buffer) (otherwise).1231-1232- This is always `true` when the `encoding` option is binary.1233-1234- @default `false` with `subprocess.iterable()`, `true` otherwise1235- */1236- readonly binary?: boolean;1237-1238- /**1239- If both this option and the `binary` option is `false`, newlines are stripped from each line.1240-1241- @default `false` with `subprocess.iterable()`, `true` otherwise1242- */1243- readonly preserveNewlines?: boolean;1244-};1245-1246-type WritableOptions = {1247- /**1248- Which stream to write to the subprocess. A file descriptor like `"fd3"` can also be passed.1249-1250- @default 'stdin'1251- */1252- readonly to?: ToOption;1253-};1254-1255-type DuplexOptions = ReadableOptions & WritableOptions;1256-1257-type SubprocessAsyncIterable<1258- BinaryOption extends boolean | undefined,1259- EncodingOption extends Options['encoding'],1260-> = AsyncIterableIterator<1261-EncodingOption extends BinaryEncodingOption1262- ? Uint8Array1263- : BinaryOption extends true1264- ? Uint8Array1265- : string1266->;1267-1268-type HasIpc<OptionsType extends Options> = OptionsType['ipc'] extends true1269- ? true1270- : OptionsType['stdio'] extends StdioOptionsArray1271- ? 'ipc' extends OptionsType['stdio'][number] ? true : false1272- : false;1273-1274-export type ExecaResultPromise<OptionsType extends Options = Options> = {1275- /**1276- Process identifier ([PID](https://en.wikipedia.org/wiki/Process_identifier)).1277-1278- This is `undefined` if the subprocess failed to spawn.1279- */1280- pid?: number;1281-1282- /**1283- Send a `message` to the subprocess. The type of `message` depends on the `serialization` option.1284- The subprocess receives it as a [`message` event](https://nodejs.org/api/process.html#event-message).1285-1286- This returns `true` on success.1287-1288- This requires the `ipc` option to be `true`.1289-1290- [More info.](https://nodejs.org/api/child_process.html#subprocesssendmessage-sendhandle-options-callback)1291- */1292- send: HasIpc<OptionsType> extends true ? ChildProcess['send'] : undefined;1293-1294- /**1295- The subprocess `stdin` as a stream.1296-1297- This is `null` if the `stdin` option is set to `'inherit'`, `'ignore'`, `Readable` or `integer`.1298-1299- This is intended for advanced cases. Please consider using the `stdin` option, `input` option, `inputFile` option, or `subprocess.pipe()` instead.1300- */1301- stdin: StreamUnlessIgnored<'0', OptionsType>;1302-1303- /**1304- The subprocess `stdout` as a stream.1305-1306- This is `null` if the `stdout` option is set to `'inherit'`, `'ignore'`, `Writable` or `integer`.1307-1308- This is intended for advanced cases. Please consider using `result.stdout`, the `stdout` option, `subprocess.iterable()`, or `subprocess.pipe()` instead.1309- */1310- stdout: StreamUnlessIgnored<'1', OptionsType>;1311-1312- /**1313- The subprocess `stderr` as a stream.1314-1315- This is `null` if the `stderr` option is set to `'inherit'`, `'ignore'`, `Writable` or `integer`.1316-1317- This is intended for advanced cases. Please consider using `result.stderr`, the `stderr` option, `subprocess.iterable()`, or `subprocess.pipe()` instead.1318- */1319- stderr: StreamUnlessIgnored<'2', OptionsType>;1320-1321- /**1322- Stream combining/interleaving `subprocess.stdout` and `subprocess.stderr`.1323-1324- This is `undefined` if either:1325- - the `all` option is `false` (the default value).1326- - both `stdout` and `stderr` options are set to `'inherit'`, `'ignore'`, `Writable` or `integer`.1327-1328- This is intended for advanced cases. Please consider using `result.all`, the `stdout`/`stderr` option, `subprocess.iterable()`, or `subprocess.pipe()` instead.1329- */1330- all: AllStream<OptionsType>;1331-1332- /**1333- The subprocess `stdin`, `stdout`, `stderr` and other files descriptors as an array of streams.1334-1335- Each array item is `null` if the corresponding `stdin`, `stdout`, `stderr` or `stdio` option is set to `'inherit'`, `'ignore'`, `Stream` or `integer`.1336-1337- This is intended for advanced cases. Please consider using `result.stdio`, the `stdio` option, `subprocess.iterable()` or `subprocess.pipe()` instead.1338- */1339- stdio: StdioArrayStreams<OptionsType>;1340-1341- catch<ResultType = never>(1342- onRejected?: (reason: ExecaError<OptionsType>) => ResultType | PromiseLike<ResultType>1343- ): Promise<ExecaResult<OptionsType> | ResultType>;1344-1345- /**1346- Sends a [signal](https://nodejs.org/api/os.html#signal-constants) to the subprocess. The default signal is the `killSignal` option. `killSignal` defaults to `SIGTERM`, which terminates the subprocess.1347-1348- This returns `false` when the signal could not be sent, for example when the subprocess has already exited.1349-1350- When an error is passed as argument, it is set to the subprocess' `error.cause`. The subprocess is then terminated with the default signal. This does not emit the [`error` event](https://nodejs.org/api/child_process.html#event-error).1351-1352- [More info.](https://nodejs.org/api/child_process.html#subprocesskillsignal)1353- */1354- kill(signal: Parameters<ChildProcess['kill']>[0], error?: Error): ReturnType<ChildProcess['kill']>;1355- kill(error?: Error): ReturnType<ChildProcess['kill']>;1356-1357- /**1358- Subprocesses are [async iterables](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncIterator). They iterate over each output line.1359-1360- The iteration waits for the subprocess to end. It throws if the subprocess fails. This means you do not need to `await` the subprocess' promise.1361- */1362- [Symbol.asyncIterator](): SubprocessAsyncIterable<undefined, OptionsType['encoding']>;1363-1364- /**1365- Same as `subprocess[Symbol.asyncIterator]` except options can be provided.1366- */1367- iterable<IterableOptions extends ReadableOptions = {}>(readableOptions?: IterableOptions): SubprocessAsyncIterable<IterableOptions['binary'], OptionsType['encoding']>;1368-1369- /**1370- Converts the subprocess to a readable stream.1371-1372- Unlike `subprocess.stdout`, the stream waits for the subprocess to end and emits an [`error`](https://nodejs.org/api/stream.html#event-error) event if the subprocess fails. This means you do not need to `await` the subprocess' promise. On the other hand, you do need to handle to the stream `error` event. This can be done by using [`await finished(stream)`](https://nodejs.org/api/stream.html#streamfinishedstream-options), [`await pipeline(..., stream)`](https://nodejs.org/api/stream.html#streampipelinesource-transforms-destination-options) or [`await text(stream)`](https://nodejs.org/api/webstreams.html#streamconsumerstextstream) which throw an exception when the stream errors.1373-1374- Before using this method, please first consider the `stdin`/`stdout`/`stderr`/`stdio` options, `subprocess.pipe()` or `subprocess.iterable()`.1375- */1376- readable(readableOptions?: ReadableOptions): Readable;1377-1378- /**1379- Converts the subprocess to a writable stream.1380-1381- Unlike `subprocess.stdin`, the stream waits for the subprocess to end and emits an [`error`](https://nodejs.org/api/stream.html#event-error) event if the subprocess fails. This means you do not need to `await` the subprocess' promise. On the other hand, you do need to handle to the stream `error` event. This can be done by using [`await finished(stream)`](https://nodejs.org/api/stream.html#streamfinishedstream-options) or [`await pipeline(stream, ...)`](https://nodejs.org/api/stream.html#streampipelinesource-transforms-destination-options) which throw an exception when the stream errors.1382-1383- Before using this method, please first consider the `stdin`/`stdout`/`stderr`/`stdio` options or `subprocess.pipe()`.1384- */1385- writable(writableOptions?: WritableOptions): Writable;1386-1387- /**1388- Converts the subprocess to a duplex stream.1389-1390- The stream waits for the subprocess to end and emits an [`error`](https://nodejs.org/api/stream.html#event-error) event if the subprocess fails. This means you do not need to `await` the subprocess' promise. On the other hand, you do need to handle to the stream `error` event. This can be done by using [`await finished(stream)`](https://nodejs.org/api/stream.html#streamfinishedstream-options), [`await pipeline(..., stream, ...)`](https://nodejs.org/api/stream.html#streampipelinesource-transforms-destination-options) or [`await text(stream)`](https://nodejs.org/api/webstreams.html#streamconsumerstextstream) which throw an exception when the stream errors.1391-1392- Before using this method, please first consider the `stdin`/`stdout`/`stderr`/`stdio` options, `subprocess.pipe()` or `subprocess.iterable()`.1393- */1394- duplex(duplexOptions?: DuplexOptions): Duplex;1395-} & PipableSubprocess;1396-1397-export type ExecaSubprocess<OptionsType extends Options = Options> = Omit<ChildProcess, keyof ExecaResultPromise<OptionsType>> &1398-ExecaResultPromise<OptionsType> &1399-Promise<ExecaResult<OptionsType>>;1400-1401-type TemplateExpression = string | number | CommonResultInstance1402-| ReadonlyArray<string | number | CommonResultInstance>;1403-1404-type TemplateString = readonly [TemplateStringsArray, ...readonly TemplateExpression[]];1405-type SimpleTemplateString = readonly [TemplateStringsArray, string?];1406-1407-type Execa<OptionsType extends Options> = {1408- <NewOptionsType extends Options = {}>(options: NewOptionsType): Execa<OptionsType & NewOptionsType>;1409-1410- (...templateString: TemplateString): ExecaSubprocess<OptionsType>;1411-1412- <NewOptionsType extends Options = {}>(1413- file: string | URL,1414- arguments?: readonly string[],1415- options?: NewOptionsType,1416- ): ExecaSubprocess<OptionsType & NewOptionsType>;1417-1418- <NewOptionsType extends Options = {}>(1419- file: string | URL,1420- options?: NewOptionsType,1421- ): ExecaSubprocess<OptionsType & NewOptionsType>;1422-};1423-1424-/**1425-Executes a command using `file ...arguments`.1426-1427-Arguments are automatically escaped. They can contain any character, including spaces, tabs and newlines.1428-1429-When `command` is a template string, it includes both the `file` and its `arguments`.1430-1431-The `command` template string can inject any `${value}` with the following types: string, number, `subprocess` or an array of those types. For example: `` execa`echo one ${'two'} ${3} ${['four', 'five']}` ``. For `${subprocess}`, the subprocess's `stdout` is used.1432-1433-When `command` is a template string, arguments can contain any character, but spaces, tabs and newlines must use `${}` like `` execa`echo ${'has space'}` ``.1434-1435-The `command` template string can use multiple lines and indentation.1436-1437-`execa(options)` can be used to return a new instance of Execa but with different default `options`. Consecutive calls are merged to previous ones. This allows setting global options or sharing options between multiple commands.1438-1439-@param file - The program/script to execute, as a string or file URL1440-@param arguments - Arguments to pass to `file` on execution.1441-@returns An `ExecaSubprocess` that is both:1442-- a `Promise` resolving or rejecting with a subprocess `result`.1443-- a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.1444-@throws A subprocess `result` error1445-1446-@example <caption>Promise interface</caption>1447-```1448-import {execa} from 'execa';1449-1450-const {stdout} = await execa('echo', ['unicorns']);1451-console.log(stdout);1452-//=> 'unicorns'1453-```1454-1455-@example <caption>Global/shared options</caption>1456-```1457-import {execa as execa_} from 'execa';1458-1459-const execa = execa_({verbose: 'full'});1460-1461-await execa('echo', ['unicorns']);1462-//=> 'unicorns'1463-```1464-1465-@example <caption>Template string interface</caption>1466-1467-```1468-import {execa} from 'execa';1469-1470-const arg = 'unicorns';1471-const {stdout} = await execa`echo ${arg} & rainbows!`;1472-console.log(stdout);1473-//=> 'unicorns & rainbows!'1474-```1475-1476-@example <caption>Template string multiple arguments</caption>1477-1478-```1479-import {execa} from 'execa';1480-1481-const args = ['unicorns', '&', 'rainbows!'];1482-const {stdout} = await execa`echo ${args}`;1483-console.log(stdout);1484-//=> 'unicorns & rainbows!'1485-```1486-1487-@example <caption>Template string with options</caption>1488-1489-```1490-import {execa} from 'execa';1491-1492-await execa({verbose: 'full'})`echo unicorns`;1493-//=> 'unicorns'1494-```1495-1496-@example <caption>Redirect output to a file</caption>1497-```1498-import {execa} from 'execa';1499-1500-// Similar to `echo unicorns > stdout.txt` in Bash1501-await execa('echo', ['unicorns'], {stdout: {file: 'stdout.txt'}});1502-1503-// Similar to `echo unicorns 2> stdout.txt` in Bash1504-await execa('echo', ['unicorns'], {stderr: {file: 'stderr.txt'}});1505-1506-// Similar to `echo unicorns &> stdout.txt` in Bash1507-await execa('echo', ['unicorns'], {stdout: {file: 'all.txt'}, stderr: {file: 'all.txt'}});1508-```1509-1510-@example <caption>Redirect input from a file</caption>1511-```1512-import {execa} from 'execa';1513-1514-// Similar to `cat < stdin.txt` in Bash1515-const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});1516-console.log(stdout);1517-//=> 'unicorns'1518-```1519-1520-@example <caption>Save and pipe output from a subprocess</caption>1521-```1522-import {execa} from 'execa';1523-1524-const {stdout} = await execa('echo', ['unicorns'], {stdout: ['pipe', 'inherit']});1525-// Prints `unicorns`1526-console.log(stdout);1527-// Also returns 'unicorns'1528-```1529-1530-@example <caption>Pipe multiple subprocesses</caption>1531-```1532-import {execa} from 'execa';1533-1534-// Similar to `echo unicorns | cat` in Bash1535-const {stdout} = await execa('echo', ['unicorns']).pipe(execa('cat'));1536-console.log(stdout);1537-//=> 'unicorns'1538-```1539-1540-@example <caption>Pipe with template strings</caption>1541-```1542-import {execa} from 'execa';1543-1544-await execa`npm run build`1545- .pipe`sort`1546- .pipe`head -n2`;1547-```1548-1549-@example <caption>Iterate over output lines</caption>1550-```1551-import {execa} from 'execa';1552-1553-for await (const line of execa`npm run build`)) {1554- if (line.includes('ERROR')) {1555- console.log(line);1556- }1557-}1558-```1559-1560-@example <caption>Handling errors</caption>1561-```1562-import {execa} from 'execa';1563-1564-// Catching an error1565-try {1566- await execa('unknown', ['command']);1567-} catch (error) {1568- console.log(error);1569- /*1570- ExecaError: Command failed with ENOENT: unknown command1571- spawn unknown ENOENT1572- at ...1573- at ... {1574- shortMessage: 'Command failed with ENOENT: unknown command\nspawn unknown ENOENT',1575- originalMessage: 'spawn unknown ENOENT',1576- command: 'unknown command',1577- escapedCommand: 'unknown command',1578- cwd: '/path/to/cwd',1579- durationMs: 28.217566,1580- failed: true,1581- timedOut: false,1582- isCanceled: false,1583- isTerminated: false,1584- isMaxBuffer: false,1585- code: 'ENOENT',1586- stdout: '',1587- stderr: '',1588- stdio: [undefined, '', ''],1589- pipedFrom: []1590- [cause]: Error: spawn unknown ENOENT1591- at ...1592- at ... {1593- errno: -2,1594- code: 'ENOENT',1595- syscall: 'spawn unknown',1596- path: 'unknown',1597- spawnargs: [ 'command' ]1598- }1599- }1600- \*\/1601-}1602-```1603-*/1604-declare const execa: Execa<{}>;1605-1606-type ExecaSync<OptionsType extends SyncOptions> = {1607- <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaSync<OptionsType & NewOptionsType>;1608-1609- (...templateString: TemplateString): ExecaSyncResult<OptionsType>;1610-1611- <NewOptionsType extends SyncOptions = {}>(1612- file: string | URL,1613- arguments?: readonly string[],1614- options?: NewOptionsType,1615- ): ExecaSyncResult<OptionsType & NewOptionsType>;1616-1617- <NewOptionsType extends SyncOptions = {}>(1618- file: string | URL,1619- options?: NewOptionsType,1620- ): ExecaSyncResult<OptionsType & NewOptionsType>;1621-};1622-1623-/**1624-Same as `execa()` but synchronous.1625-1626-Returns or throws a subprocess `result`. The `subprocess` is not returned: its methods and properties are not available.1627-1628-The following features cannot be used:1629-- Streams: `subprocess.stdin`, `subprocess.stdout`, `subprocess.stderr`, `subprocess.readable()`, `subprocess.writable()`, `subprocess.duplex()`.1630-- The `stdin`, `stdout`, `stderr` and `stdio` options cannot be `'overlapped'`, an async iterable, an async transform, a `Duplex`, nor a web stream. Node.js streams can be passed but only if either they [have a file descriptor](#redirect-a-nodejs-stream-fromto-stdinstdoutstderr), or the `input` option is used.1631-- Signal termination: `subprocess.kill()`, `subprocess.pid`, `cleanup` option, `cancelSignal` option, `forceKillAfterDelay` option.1632-- Piping multiple processes: `subprocess.pipe()`.1633-- `subprocess.iterable()`.1634-- `ipc` and `serialization` options.1635-- `result.all` is not interleaved.1636-- `detached` option.1637-- The `maxBuffer` option is always measured in bytes, not in characters, lines nor objects. Also, it ignores transforms and the `encoding` option.1638-1639-@param file - The program/script to execute, as a string or file URL1640-@param arguments - Arguments to pass to `file` on execution.1641-@returns A subprocess `result` object1642-@throws A subprocess `result` error1643-1644-@example <caption>Promise interface</caption>1645-```1646-import {execa} from 'execa';1647-1648-const {stdout} = execaSync('echo', ['unicorns']);1649-console.log(stdout);1650-//=> 'unicorns'1651-```1652-1653-@example <caption>Redirect input from a file</caption>1654-```1655-import {execa} from 'execa';1656-1657-// Similar to `cat < stdin.txt` in Bash1658-const {stdout} = execaSync('cat', {inputFile: 'stdin.txt'});1659-console.log(stdout);1660-//=> 'unicorns'1661-```1662-1663-@example <caption>Handling errors</caption>1664-```1665-import {execa} from 'execa';1666-1667-// Catching an error1668-try {1669- execaSync('unknown', ['command']);1670-} catch (error) {1671- console.log(error);1672- /*1673- {1674- message: 'Command failed with ENOENT: unknown command\nspawnSync unknown ENOENT',1675- errno: -2,1676- code: 'ENOENT',1677- syscall: 'spawnSync unknown',1678- path: 'unknown',1679- spawnargs: ['command'],1680- shortMessage: 'Command failed with ENOENT: unknown command\nspawnSync unknown ENOENT',1681- originalMessage: 'spawnSync unknown ENOENT',1682- command: 'unknown command',1683- escapedCommand: 'unknown command',1684- cwd: '/path/to/cwd',1685- failed: true,1686- timedOut: false,1687- isCanceled: false,1688- isTerminated: false,1689- isMaxBuffer: false,1690- stdio: [],1691- pipedFrom: []1692- }1693- \*\/1694-}1695-```1696-*/1697-declare const execaSync: ExecaSync<{}>;1698-1699-type ExecaCommand<OptionsType extends Options> = {1700- <NewOptionsType extends Options = {}>(options: NewOptionsType): ExecaCommand<OptionsType & NewOptionsType>;1701-1702- (...templateString: SimpleTemplateString): ExecaSubprocess<OptionsType>;1703-1704- <NewOptionsType extends Options = {}>(1705- command: string,1706- options?: NewOptionsType,1707- ): ExecaSubprocess<OptionsType & NewOptionsType>;1708-};1709-1710-/**1711-`execa` with the template string syntax allows the `file` or the `arguments` to be user-defined (by injecting them with `${}`). However, if _both_ the `file` and the `arguments` are user-defined, _and_ those are supplied as a single string, then `execaCommand(command)` must be used instead.1712-1713-This is only intended for very specific cases, such as a REPL. This should be avoided otherwise.1714-1715-Just like `execa()`, this can bind options. It can also be run synchronously using `execaCommandSync()`.1716-1717-Arguments are automatically escaped. They can contain any character, but spaces must be escaped with a backslash like `execaCommand('echo has\\ space')`.1718-1719-@param command - The program/script to execute and its arguments.1720-@returns An `ExecaSubprocess` that is both:1721-- a `Promise` resolving or rejecting with a subprocess `result`.1722-- a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.1723-@throws A subprocess `result` error1724-1725-@example1726-```1727-import {execaCommand} from 'execa';1728-1729-const {stdout} = await execaCommand('echo unicorns');1730-console.log(stdout);1731-//=> 'unicorns'1732-```1733-*/1734-declare const execaCommand: ExecaCommand<{}>;1735-1736-type ExecaCommandSync<OptionsType extends SyncOptions> = {1737- <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaCommandSync<OptionsType & NewOptionsType>;1738-1739- (...templateString: SimpleTemplateString): ExecaSyncResult<OptionsType>;1740-1741- <NewOptionsType extends SyncOptions = {}>(1742- command: string,1743- options?: NewOptionsType,1744- ): ExecaSyncResult<OptionsType & NewOptionsType>;1745-};1746-1747-/**1748-Same as `execaCommand()` but synchronous.1749-1750-Returns or throws a subprocess `result`. The `subprocess` is not returned: its methods and properties are not available.1751-1752-The following features cannot be used:1753-- Streams: `subprocess.stdin`, `subprocess.stdout`, `subprocess.stderr`, `subprocess.readable()`, `subprocess.writable()`, `subprocess.duplex()`.1754-- The `stdin`, `stdout`, `stderr` and `stdio` options cannot be `'overlapped'`, an async iterable, an async transform, a `Duplex`, nor a web stream. Node.js streams can be passed but only if either they [have a file descriptor](#redirect-a-nodejs-stream-fromto-stdinstdoutstderr), or the `input` option is used.1755-- Signal termination: `subprocess.kill()`, `subprocess.pid`, `cleanup` option, `cancelSignal` option, `forceKillAfterDelay` option.1756-- Piping multiple processes: `subprocess.pipe()`.1757-- `subprocess.iterable()`.1758-- `ipc` and `serialization` options.1759-- `result.all` is not interleaved.1760-- `detached` option.1761-- The `maxBuffer` option is always measured in bytes, not in characters, lines nor objects. Also, it ignores transforms and the `encoding` option.1762-1763-@param command - The program/script to execute and its arguments.1764-@returns A subprocess `result` object1765-@throws A subprocess `result` error1766-1767-@example1768-```1769-import {execaCommandSync} from 'execa';1770-1771-const {stdout} = execaCommandSync('echo unicorns');1772-console.log(stdout);1773-//=> 'unicorns'1774-```1775-*/1776-declare const execaCommandSync: ExecaCommandSync<{}>;1777-1778-type ExecaScriptCommon<OptionsType extends CommonOptions> = {1779- <NewOptionsType extends CommonOptions = {}>(options: NewOptionsType): ExecaScript<OptionsType & NewOptionsType>;1780-1781- (...templateString: TemplateString): ExecaSubprocess<StricterOptions<OptionsType, Options>>;1782-1783- <NewOptionsType extends Options = {}>(1784- file: string | URL,1785- arguments?: readonly string[],1786- options?: NewOptionsType,1787- ): ExecaSubprocess<OptionsType & NewOptionsType>;1788-1789- <NewOptionsType extends Options = {}>(1790- file: string | URL,1791- options?: NewOptionsType,1792- ): ExecaSubprocess<OptionsType & NewOptionsType>;1793-};1794-1795-type ExecaScriptSync<OptionsType extends CommonOptions> = {1796- <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaScriptSync<OptionsType & NewOptionsType>;1797-1798- (...templateString: TemplateString): ExecaSyncResult<StricterOptions<OptionsType, SyncOptions>>;1799-1800- <NewOptionsType extends SyncOptions = {}>(1801- file: string | URL,1802- arguments?: readonly string[],1803- options?: NewOptionsType,1804- ): ExecaSyncResult<OptionsType & NewOptionsType>;1805-1806- <NewOptionsType extends SyncOptions = {}>(1807- file: string | URL,1808- options?: NewOptionsType,1809- ): ExecaSyncResult<OptionsType & NewOptionsType>;1810-};1811-1812-type ExecaScript<OptionsType extends CommonOptions> = {1813- sync: ExecaScriptSync<OptionsType>;1814- s: ExecaScriptSync<OptionsType>;1815-} & ExecaScriptCommon<OptionsType>;1816-1817-/**1818-Same as `execa()` but using the `stdin: 'inherit'` and `preferLocal: true` options.1819-1820-Just like `execa()`, this can use the template string syntax or bind options. It can also be run synchronously using `$.sync()` or `$.s()`.1821-1822-This is the preferred method when executing multiple commands in a script file.1823-1824-@returns An `ExecaSubprocess` that is both:1825- - a `Promise` resolving or rejecting with a subprocess `result`.1826- - a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.1827-@throws A subprocess `result` error1828-1829-@example <caption>Basic</caption>1830-```1831-import {$} from 'execa';1832-1833-const branch = await $`git branch --show-current`;1834-await $`dep deploy --branch=${branch}`;1835-```1836-1837-@example <caption>Verbose mode</caption>1838-```1839-> node file.js1840-unicorns1841-rainbows1842-1843-> NODE_DEBUG=execa node file.js1844-[19:49:00.360] [0] $ echo unicorns1845-unicorns1846-[19:49:00.383] [0] √ (done in 23ms)1847-[19:49:00.383] [1] $ echo rainbows1848-rainbows1849-[19:49:00.404] [1] √ (done in 21ms)1850-```1851-*/1852-export const $: ExecaScript<{}>;1853-1854-type ExecaNode<OptionsType extends Options> = {1855- <NewOptionsType extends Options = {}>(options: NewOptionsType): ExecaNode<OptionsType & NewOptionsType>;1856-1857- (...templateString: TemplateString): ExecaSubprocess<OptionsType>;1858-1859- <NewOptionsType extends Options = {}>(1860- scriptPath: string | URL,1861- arguments?: readonly string[],1862- options?: NewOptionsType,1863- ): ExecaSubprocess<OptionsType & NewOptionsType>;1864-1865- <NewOptionsType extends Options = {}>(1866- scriptPath: string | URL,1867- options?: NewOptionsType,1868- ): ExecaSubprocess<OptionsType & NewOptionsType>;1869-};1870-1871-/**1872-Same as `execa()` but using the `node: true` option.1873-Executes a Node.js file using `node scriptPath ...arguments`.1874-1875-Just like `execa()`, this can use the template string syntax or bind options.1876-1877-This is the preferred method when executing Node.js files.1878-1879-@param scriptPath - Node.js script to execute, as a string or file URL1880-@param arguments - Arguments to pass to `scriptPath` on execution.1881-@returns An `ExecaSubprocess` that is both:1882-- a `Promise` resolving or rejecting with a subprocess `result`.1883-- a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with some additional methods and properties.1884-@throws A subprocess `result` error1885-1886-@example1887-```1888-import {execaNode} from 'execa';1889-1890-await execaNode('scriptPath', ['argument']);1891-```1892-*/1893-export const execaNode: ExecaNode<{}>;1+export type {StdinOption, StdinOptionSync, StdoutStderrOption, StdoutStderrOptionSync, StdioOption, StdioOptionSync} from './types/stdio/type';2+export type {Options, SyncOptions} from './types/arguments/options';3+export type {ExecaResult, ExecaSyncResult} from './types/return/result';4+export type {ExecaResultPromise, ExecaSubprocess} from './types/subprocess/subprocess';5+/* eslint-disable import/extensions */6+export {ExecaError, ExecaSyncError} from './types/return/final-error';7+export {execa} from './types/methods/main-async';8+export {execaSync} from './types/methods/main-sync';9+export {execaCommand, execaCommandSync} from './types/methods/command';10+export {$} from './types/methods/script';11+export {execaNode} from './types/methods/node';12+/* eslint-enable import/extensions */deleted:index.test-d.ts-4133 removed
1-// For some reason a default import of `process` causes2-// `process.stdin`, `process.stderr`, and `process.stdout`3-// to get treated as `any` by `@typescript-eslint/no-unsafe-assignment`.4-import * as process from 'node:process';5-import {Readable, Writable, Duplex, Transform} from 'node:stream';6-import {createWriteStream} from 'node:fs';7-import {expectType, expectNotType, expectError, expectAssignable, expectNotAssignable} from 'tsd';8-import {9- $,10- execa,11- execaSync,12- execaCommand,13- execaCommandSync,14- execaNode,15- ExecaError,16- ExecaSyncError,17- type Options,18- type ExecaResult,19- type ExecaSubprocess,20- type SyncOptions,21- type ExecaSyncResult,22- type StdinOption,23- type StdinOptionSync,24- type StdoutStderrOption,25- type StdoutStderrOptionSync,26- type StdioOption,27- type StdioOptionSync,28-} from './index.js';29-30-const pipeInherit = ['pipe', 'inherit'] as const;31-const pipeUndefined = ['pipe', undefined] as const;32-33-const fileUrl = new URL('file:///test');34-const fileObject = {file: './test'} as const;35-const invalidFileObject = {file: fileUrl} as const;36-37-const stringArray = ['foo', 'bar'] as const;38-const binaryArray = [new Uint8Array(), new Uint8Array()] as const;39-const objectArray = [{}, {}] as const;40-41-const stringIterableFunction = function * () {42- yield '';43-};44-45-const stringIterable = stringIterableFunction();46-47-const binaryIterableFunction = function * () {48- yield new Uint8Array(0);49-};50-51-const binaryIterable = binaryIterableFunction();52-53-const objectIterableFunction = function * () {54- yield {};55-};56-57-const objectIterable = objectIterableFunction();58-59-const asyncStringIterableFunction = async function * () {60- yield '';61-};62-63-const asyncStringIterable = asyncStringIterableFunction();64-65-const asyncBinaryIterableFunction = async function * () {66- yield new Uint8Array(0);67-};68-69-const asyncBinaryIterable = asyncBinaryIterableFunction();70-71-const asyncObjectIterableFunction = async function * () {72- yield {};73-};74-75-const asyncObjectIterable = asyncObjectIterableFunction();76-77-const duplexStream = new Duplex();78-const duplex = {transform: duplexStream} as const;79-const duplexObject = {transform: duplexStream as Duplex & {readonly readableObjectMode: true}} as const;80-const duplexNotObject = {transform: duplexStream as Duplex & {readonly readableObjectMode: false}} as const;81-const duplexObjectProperty = {transform: duplexStream, objectMode: true as const} as const;82-const duplexNotObjectProperty = {transform: duplexStream, objectMode: false as const} as const;83-const duplexTransform = {transform: new Transform()} as const;84-const duplexWithInvalidObjectMode = {...duplex, objectMode: 'true'} as const;85-86-const webTransformInstance = new TransformStream();87-const webTransform = {transform: webTransformInstance} as const;88-const webTransformObject = {transform: webTransformInstance, objectMode: true as const} as const;89-const webTransformNotObject = {transform: webTransformInstance, objectMode: false as const} as const;90-const webTransformWithInvalidObjectMode = {...webTransform, objectMode: 'true'} as const;91-92-const unknownGenerator = function * (line: unknown) {93- yield line;94-};95-96-const unknownGeneratorFull = {transform: unknownGenerator, objectMode: true} as const;97-98-const unknownFinal = function * () {99- yield {} as unknown;100-};101-102-const unknownFinalFull = {transform: unknownGenerator, final: unknownFinal, objectMode: true} as const;103-104-const objectGenerator = function * (line: unknown) {105- yield JSON.parse(line as string) as object;106-};107-108-const objectGeneratorFull = {transform: objectGenerator, objectMode: true} as const;109-110-const objectFinal = function * () {111- yield {};112-};113-114-const objectFinalFull = {transform: objectGenerator, final: objectFinal, objectMode: true} as const;115-116-const booleanGenerator = function * (line: boolean) {117- yield line;118-};119-120-const booleanGeneratorFull = {transform: booleanGenerator} as const;121-122-const stringGenerator = function * (line: string) {123- yield line;124-};125-126-const stringGeneratorFull = {transform: stringGenerator} as const;127-128-const invalidReturnGenerator = function * (line: unknown) {129- yield line;130- return false;131-};132-133-const invalidReturnGeneratorFull = {transform: invalidReturnGenerator} as const;134-135-const invalidReturnFinal = function * () {136- yield {} as unknown;137- return false;138-};139-140-const invalidReturnFinalFull = {transform: stringGenerator, final: invalidReturnFinal} as const;141-142-const asyncGenerator = async function * (line: unknown) {143- yield '';144-};145-146-const asyncGeneratorFull = {transform: asyncGenerator} as const;147-148-const asyncFinal = async function * () {149- yield '';150-};151-152-const asyncFinalFull = {transform: asyncGenerator, final: asyncFinal} as const;153-154-const transformWithBinary = {transform: unknownGenerator, binary: true} as const;155-const transformWithInvalidBinary = {transform: unknownGenerator, binary: 'true'} as const;156-const transformWithPreserveNewlines = {transform: unknownGenerator, preserveNewlines: true} as const;157-const transformWithInvalidPreserveNewlines = {transform: unknownGenerator, preserveNewlines: 'true'} as const;158-const transformWithObjectMode = {transform: unknownGenerator, objectMode: true} as const;159-const transformWithInvalidObjectMode = {transform: unknownGenerator, objectMode: 'true'} as const;160-const binaryOnly = {binary: true} as const;161-const preserveNewlinesOnly = {preserveNewlines: true} as const;162-const objectModeOnly = {objectMode: true} as const;163-const finalOnly = {final: unknownFinal} as const;164-165-type AnyChunk = string | Uint8Array | string[] | unknown[] | undefined;166-expectType<Writable | null>({} as ExecaSubprocess['stdin']);167-expectType<Readable | null>({} as ExecaSubprocess['stdout']);168-expectType<Readable | null>({} as ExecaSubprocess['stderr']);169-expectType<Readable | undefined>({} as ExecaSubprocess['all']);170-expectType<AnyChunk>({} as ExecaResult['stdout']);171-expectType<AnyChunk>({} as ExecaResult['stderr']);172-expectType<AnyChunk>({} as ExecaResult['all']);173-expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as ExecaResult['stdio']);174-expectType<AnyChunk>({} as ExecaSyncResult['stdout']);175-expectType<AnyChunk>({} as ExecaSyncResult['stderr']);176-expectType<AnyChunk>({} as ExecaSyncResult['all']);177-expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as ExecaSyncResult['stdio']);178-179-try {180- const execaPromise = execa('unicorns', {all: true});181- const unicornsResult = await execaPromise;182-183- const execaBufferPromise = execa('unicorns', {encoding: 'buffer', all: true});184- const bufferResult = await execaBufferPromise;185-186- const execaHexPromise = execa('unicorns', {encoding: 'hex', all: true});187- const hexResult = await execaHexPromise;188-189- const scriptPromise = $`unicorns`;190-191- const pipeOptions = {from: 'stderr', to: 'fd3', all: true} as const;192-193- type BufferExecaReturnValue = typeof bufferResult;194- type EmptyExecaReturnValue = ExecaResult<{}>;195- type ShortcutExecaReturnValue = ExecaResult<typeof pipeOptions>;196-197- expectType<BufferExecaReturnValue>(await execaPromise.pipe(execaBufferPromise));198- expectType<BufferExecaReturnValue>(await scriptPromise.pipe(execaBufferPromise));199- expectNotType<BufferExecaReturnValue>(await execaPromise.pipe(execaPromise));200- expectNotType<BufferExecaReturnValue>(await scriptPromise.pipe(execaPromise));201- expectType<EmptyExecaReturnValue>(await execaPromise.pipe`stdin`);202- expectType<EmptyExecaReturnValue>(await scriptPromise.pipe`stdin`);203- expectType<ShortcutExecaReturnValue>(await execaPromise.pipe('stdin', pipeOptions));204- expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe('stdin', pipeOptions));205- expectType<BufferExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe(execaBufferPromise));206- expectType<BufferExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe(execaBufferPromise));207- expectType<EmptyExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe`stdin`);208- expectType<EmptyExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe`stdin`);209- expectType<ShortcutExecaReturnValue>(await execaPromise.pipe(execaPromise).pipe('stdin', pipeOptions));210- expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe(execaPromise).pipe('stdin', pipeOptions));211- expectType<BufferExecaReturnValue>(await execaPromise.pipe`stdin`.pipe(execaBufferPromise));212- expectType<BufferExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe(execaBufferPromise));213- expectType<EmptyExecaReturnValue>(await execaPromise.pipe`stdin`.pipe`stdin`);214- expectType<EmptyExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe`stdin`);215- expectType<ShortcutExecaReturnValue>(await execaPromise.pipe`stdin`.pipe('stdin', pipeOptions));216- expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe`stdin`.pipe('stdin', pipeOptions));217- expectType<BufferExecaReturnValue>(await execaPromise.pipe('pipe').pipe(execaBufferPromise));218- expectType<BufferExecaReturnValue>(await scriptPromise.pipe('pipe').pipe(execaBufferPromise));219- expectType<EmptyExecaReturnValue>(await execaPromise.pipe('pipe').pipe`stdin`);220- expectType<EmptyExecaReturnValue>(await scriptPromise.pipe('pipe').pipe`stdin`);221- expectType<ShortcutExecaReturnValue>(await execaPromise.pipe('pipe').pipe('stdin', pipeOptions));222- expectType<ShortcutExecaReturnValue>(await scriptPromise.pipe('pipe').pipe('stdin', pipeOptions));223- await execaPromise.pipe(execaPromise).pipe(execaBufferPromise, pipeOptions);224- await scriptPromise.pipe(execaPromise).pipe(execaBufferPromise, pipeOptions);225- await execaPromise.pipe(execaBufferPromise, pipeOptions).pipe`stdin`;226- await scriptPromise.pipe(execaBufferPromise, pipeOptions).pipe`stdin`;227- await execaPromise.pipe(execaBufferPromise, pipeOptions).pipe('stdin');228- await scriptPromise.pipe(execaBufferPromise, pipeOptions).pipe('stdin');229- await execaPromise.pipe`stdin`.pipe(execaBufferPromise, pipeOptions);230- await scriptPromise.pipe`stdin`.pipe(execaBufferPromise, pipeOptions);231- await execaPromise.pipe`stdin`.pipe(pipeOptions)`stdin`;232- await scriptPromise.pipe`stdin`.pipe(pipeOptions)`stdin`;233- await execaPromise.pipe`stdin`.pipe('stdin', pipeOptions);234- await scriptPromise.pipe`stdin`.pipe('stdin', pipeOptions);235- expectError(execaPromise.pipe(execaBufferPromise).stdout);236- expectError(scriptPromise.pipe(execaBufferPromise).stdout);237- expectError(execaPromise.pipe`stdin`.stdout);238- expectError(scriptPromise.pipe`stdin`.stdout);239- expectError(execaPromise.pipe('stdin').stdout);240- expectError(scriptPromise.pipe('stdin').stdout);241- expectError(execaPromise.pipe(createWriteStream('output.txt')));242- expectError(scriptPromise.pipe(createWriteStream('output.txt')));243- expectError(execaPromise.pipe(false));244- expectError(scriptPromise.pipe(false));245- await execaPromise.pipe(execaBufferPromise, {});246- await scriptPromise.pipe(execaBufferPromise, {});247- await execaPromise.pipe({})`stdin`;248- await scriptPromise.pipe({})`stdin`;249- await execaPromise.pipe('stdin', {});250- await scriptPromise.pipe('stdin', {});251- expectError(execaPromise.pipe(execaBufferPromise, 'stdout'));252- expectError(scriptPromise.pipe(execaBufferPromise, 'stdout'));253- expectError(execaPromise.pipe('stdout')`stdin`);254- expectError(scriptPromise.pipe('stdout')`stdin`);255- await execaPromise.pipe(execaBufferPromise, {from: 'stdout'});256- await scriptPromise.pipe(execaBufferPromise, {from: 'stdout'});257- await execaPromise.pipe({from: 'stdout'})`stdin`;258- await scriptPromise.pipe({from: 'stdout'})`stdin`;259- await execaPromise.pipe('stdin', {from: 'stdout'});260- await scriptPromise.pipe('stdin', {from: 'stdout'});261- await execaPromise.pipe(execaBufferPromise, {from: 'stderr'});262- await scriptPromise.pipe(execaBufferPromise, {from: 'stderr'});263- await execaPromise.pipe({from: 'stderr'})`stdin`;264- await scriptPromise.pipe({from: 'stderr'})`stdin`;265- await execaPromise.pipe('stdin', {from: 'stderr'});266- await scriptPromise.pipe('stdin', {from: 'stderr'});267- await execaPromise.pipe(execaBufferPromise, {from: 'all'});268- await scriptPromise.pipe(execaBufferPromise, {from: 'all'});269- await execaPromise.pipe({from: 'all'})`stdin`;270- await scriptPromise.pipe({from: 'all'})`stdin`;271- await execaPromise.pipe('stdin', {from: 'all'});272- await scriptPromise.pipe('stdin', {from: 'all'});273- await execaPromise.pipe(execaBufferPromise, {from: 'fd3'});274- await scriptPromise.pipe(execaBufferPromise, {from: 'fd3'});275- await execaPromise.pipe({from: 'fd3'})`stdin`;276- await scriptPromise.pipe({from: 'fd3'})`stdin`;277- await execaPromise.pipe('stdin', {from: 'fd3'});278- await scriptPromise.pipe('stdin', {from: 'fd3'});279- expectError(execaPromise.pipe(execaBufferPromise, {from: 'stdin'}));280- expectError(scriptPromise.pipe(execaBufferPromise, {from: 'stdin'}));281- expectError(execaPromise.pipe({from: 'stdin'})`stdin`);282- expectError(scriptPromise.pipe({from: 'stdin'})`stdin`);283- expectError(execaPromise.pipe('stdin', {from: 'stdin'}));284- expectError(scriptPromise.pipe('stdin', {from: 'stdin'}));285- await execaPromise.pipe(execaBufferPromise, {to: 'stdin'});286- await scriptPromise.pipe(execaBufferPromise, {to: 'stdin'});287- await execaPromise.pipe({to: 'stdin'})`stdin`;288- await scriptPromise.pipe({to: 'stdin'})`stdin`;289- await execaPromise.pipe('stdin', {to: 'stdin'});290- await scriptPromise.pipe('stdin', {to: 'stdin'});291- await execaPromise.pipe(execaBufferPromise, {to: 'fd3'});292- await scriptPromise.pipe(execaBufferPromise, {to: 'fd3'});293- await execaPromise.pipe({to: 'fd3'})`stdin`;294- await scriptPromise.pipe({to: 'fd3'})`stdin`;295- await execaPromise.pipe('stdin', {to: 'fd3'});296- await scriptPromise.pipe('stdin', {to: 'fd3'});297- expectError(execaPromise.pipe(execaBufferPromise, {to: 'stdout'}));298- expectError(scriptPromise.pipe(execaBufferPromise, {to: 'stdout'}));299- expectError(execaPromise.pipe({to: 'stdout'})`stdin`);300- expectError(scriptPromise.pipe({to: 'stdout'})`stdin`);301- expectError(execaPromise.pipe('stdin', {to: 'stdout'}));302- expectError(scriptPromise.pipe('stdin', {to: 'stdout'}));303- await execaPromise.pipe(execaBufferPromise, {unpipeSignal: new AbortController().signal});304- await scriptPromise.pipe(execaBufferPromise, {unpipeSignal: new AbortController().signal});305- await execaPromise.pipe({unpipeSignal: new AbortController().signal})`stdin`;306- await scriptPromise.pipe({unpipeSignal: new AbortController().signal})`stdin`;307- await execaPromise.pipe('stdin', {unpipeSignal: new AbortController().signal});308- await scriptPromise.pipe('stdin', {unpipeSignal: new AbortController().signal});309- expectError(await execaPromise.pipe(execaBufferPromise, {unpipeSignal: true}));310- expectError(await scriptPromise.pipe(execaBufferPromise, {unpipeSignal: true}));311- expectError(await execaPromise.pipe({unpipeSignal: true})`stdin`);312- expectError(await scriptPromise.pipe({unpipeSignal: true})`stdin`);313- expectError(await execaPromise.pipe('stdin', {unpipeSignal: true}));314- expectError(await scriptPromise.pipe('stdin', {unpipeSignal: true}));315- expectError(await execaPromise.pipe({})({}));316- expectError(await scriptPromise.pipe({})({}));317- expectError(await execaPromise.pipe({})(execaPromise));318- expectError(await scriptPromise.pipe({})(execaPromise));319- expectError(await execaPromise.pipe({})('stdin'));320- expectError(await scriptPromise.pipe({})('stdin'));321-322- expectType<EmptyExecaReturnValue>(await execaPromise.pipe('stdin'));323- await execaPromise.pipe('stdin');324- await execaPromise.pipe(fileUrl);325- await execaPromise.pipe('stdin', []);326- await execaPromise.pipe('stdin', stringArray);327- await execaPromise.pipe('stdin', stringArray, {});328- await execaPromise.pipe('stdin', stringArray, {from: 'stderr', to: 'stdin', all: true});329- await execaPromise.pipe('stdin', {from: 'stderr'});330- await execaPromise.pipe('stdin', {to: 'stdin'});331- await execaPromise.pipe('stdin', {all: true});332- expectError(await execaPromise.pipe(stringArray));333- expectError(await execaPromise.pipe('stdin', 'foo'));334- expectError(await execaPromise.pipe('stdin', [false]));335- expectError(await execaPromise.pipe('stdin', [], false));336- expectError(await execaPromise.pipe('stdin', {other: true}));337- expectError(await execaPromise.pipe('stdin', [], {other: true}));338- expectError(await execaPromise.pipe('stdin', {from: 'fd'}));339- expectError(await execaPromise.pipe('stdin', [], {from: 'fd'}));340- expectError(await execaPromise.pipe('stdin', {from: 'fdNotANumber'}));341- expectError(await execaPromise.pipe('stdin', [], {from: 'fdNotANumber'}));342- expectError(await execaPromise.pipe('stdin', {from: 'other'}));343- expectError(await execaPromise.pipe('stdin', [], {from: 'other'}));344- expectError(await execaPromise.pipe('stdin', {to: 'fd'}));345- expectError(await execaPromise.pipe('stdin', [], {to: 'fd'}));346- expectError(await execaPromise.pipe('stdin', {to: 'fdNotANumber'}));347- expectError(await execaPromise.pipe('stdin', [], {to: 'fdNotANumber'}));348- expectError(await execaPromise.pipe('stdin', {to: 'other'}));349- expectError(await execaPromise.pipe('stdin', [], {to: 'other'}));350-351- const pipeResult = await execaPromise.pipe`stdin`;352- expectType<string>(pipeResult.stdout);353- const ignorePipeResult = await execaPromise.pipe({stdout: 'ignore'})`stdin`;354- expectType<undefined>(ignorePipeResult.stdout);355-356- const scriptPipeResult = await scriptPromise.pipe`stdin`;357- expectType<string>(scriptPipeResult.stdout);358- const ignoreScriptPipeResult = await scriptPromise.pipe({stdout: 'ignore'})`stdin`;359- expectType<undefined>(ignoreScriptPipeResult.stdout);360-361- const shortcutPipeResult = await execaPromise.pipe('stdin');362- expectType<string>(shortcutPipeResult.stdout);363- const ignoreShortcutPipeResult = await execaPromise.pipe('stdin', {stdout: 'ignore'});364- expectType<undefined>(ignoreShortcutPipeResult.stdout);365-366- const scriptShortcutPipeResult = await scriptPromise.pipe('stdin');367- expectType<string>(scriptShortcutPipeResult.stdout);368- const ignoreShortcutScriptPipeResult = await scriptPromise.pipe('stdin', {stdout: 'ignore'});369- expectType<undefined>(ignoreShortcutScriptPipeResult.stdout);370-371- const asyncIteration = async () => {372- for await (const line of scriptPromise) {373- expectType<string>(line);374- }375-376- for await (const line of scriptPromise.iterable()) {377- expectType<string>(line);378- }379-380- for await (const line of scriptPromise.iterable({binary: false})) {381- expectType<string>(line);382- }383-384- for await (const line of scriptPromise.iterable({binary: true})) {385- expectType<Uint8Array>(line);386- }387-388- for await (const line of scriptPromise.iterable({} as {binary: boolean})) {389- expectType<string | Uint8Array>(line);390- }391-392- for await (const line of execaBufferPromise) {393- expectType<Uint8Array>(line);394- }395-396- for await (const line of execaBufferPromise.iterable()) {397- expectType<Uint8Array>(line);398- }399-400- for await (const line of execaBufferPromise.iterable({binary: false})) {401- expectType<Uint8Array>(line);402- }403-404- for await (const line of execaBufferPromise.iterable({binary: true})) {405- expectType<Uint8Array>(line);406- }407-408- for await (const line of execaBufferPromise.iterable({} as {binary: boolean})) {409- expectType<Uint8Array>(line);410- }411- };412-413- await asyncIteration();414- expectType<AsyncIterableIterator<string>>(scriptPromise.iterable());415- expectType<AsyncIterableIterator<string>>(scriptPromise.iterable({binary: false}));416- expectType<AsyncIterableIterator<Uint8Array>>(scriptPromise.iterable({binary: true}));417- expectType<AsyncIterableIterator<string | Uint8Array>>(scriptPromise.iterable({} as {binary: boolean}));418- expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable());419- expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable({binary: false}));420- expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable({binary: true}));421- expectType<AsyncIterableIterator<Uint8Array>>(execaBufferPromise.iterable({} as {binary: boolean}));422- expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable());423- expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable({binary: false}));424- expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable({binary: true}));425- expectType<AsyncIterableIterator<Uint8Array>>(execaHexPromise.iterable({} as {binary: boolean}));426-427- expectType<Readable>(scriptPromise.readable());428- expectType<Writable>(scriptPromise.writable());429- expectType<Duplex>(scriptPromise.duplex());430-431- scriptPromise.iterable({});432- scriptPromise.iterable({from: 'stdout'});433- scriptPromise.iterable({from: 'stderr'});434- scriptPromise.iterable({from: 'all'});435- scriptPromise.iterable({from: 'fd3'});436- scriptPromise.iterable({binary: false});437- scriptPromise.iterable({preserveNewlines: false});438- expectError(scriptPromise.iterable('stdout'));439- expectError(scriptPromise.iterable({from: 'stdin'}));440- expectError(scriptPromise.iterable({from: 'fd'}));441- expectError(scriptPromise.iterable({from: 'fdNotANumber'}));442- expectError(scriptPromise.iterable({binary: 'false'}));443- expectError(scriptPromise.iterable({preserveNewlines: 'false'}));444- expectError(scriptPromise.iterable({to: 'stdin'}));445- expectError(scriptPromise.iterable({other: 'stdout'}));446- scriptPromise.readable({});447- scriptPromise.readable({from: 'stdout'});448- scriptPromise.readable({from: 'stderr'});449- scriptPromise.readable({from: 'all'});450- scriptPromise.readable({from: 'fd3'});451- scriptPromise.readable({binary: false});452- scriptPromise.readable({preserveNewlines: false});453- expectError(scriptPromise.readable('stdout'));454- expectError(scriptPromise.readable({from: 'stdin'}));455- expectError(scriptPromise.readable({from: 'fd'}));456- expectError(scriptPromise.readable({from: 'fdNotANumber'}));457- expectError(scriptPromise.readable({binary: 'false'}));458- expectError(scriptPromise.readable({preserveNewlines: 'false'}));459- expectError(scriptPromise.readable({to: 'stdin'}));460- expectError(scriptPromise.readable({other: 'stdout'}));461- scriptPromise.writable({});462- scriptPromise.writable({to: 'stdin'});463- scriptPromise.writable({to: 'fd3'});464- expectError(scriptPromise.writable('stdin'));465- expectError(scriptPromise.writable({to: 'stdout'}));466- expectError(scriptPromise.writable({to: 'fd'}));467- expectError(scriptPromise.writable({to: 'fdNotANumber'}));468- expectError(scriptPromise.writable({from: 'stdout'}));469- expectError(scriptPromise.writable({binary: false}));470- expectError(scriptPromise.writable({preserveNewlines: false}));471- expectError(scriptPromise.writable({other: 'stdin'}));472- scriptPromise.duplex({});473- scriptPromise.duplex({from: 'stdout'});474- scriptPromise.duplex({from: 'stderr'});475- scriptPromise.duplex({from: 'all'});476- scriptPromise.duplex({from: 'fd3'});477- scriptPromise.duplex({from: 'stdout', to: 'stdin'});478- scriptPromise.duplex({from: 'stdout', to: 'fd3'});479- scriptPromise.duplex({binary: false});480- scriptPromise.duplex({preserveNewlines: false});481- expectError(scriptPromise.duplex('stdout'));482- expectError(scriptPromise.duplex({from: 'stdin'}));483- expectError(scriptPromise.duplex({from: 'stderr', to: 'stdout'}));484- expectError(scriptPromise.duplex({from: 'fd'}));485- expectError(scriptPromise.duplex({from: 'fdNotANumber'}));486- expectError(scriptPromise.duplex({to: 'fd'}));487- expectError(scriptPromise.duplex({to: 'fdNotANumber'}));488- expectError(scriptPromise.duplex({binary: 'false'}));489- expectError(scriptPromise.duplex({preserveNewlines: 'false'}));490- expectError(scriptPromise.duplex({other: 'stdout'}));491-492- expectType<Readable>(execaPromise.all);493- const noAllPromise = execa('unicorns');494- expectType<undefined>(noAllPromise.all);495- const noAllResult = await noAllPromise;496- expectType<undefined>(noAllResult.all);497-498- expectType<string>(unicornsResult.command);499- expectType<string>(unicornsResult.escapedCommand);500- expectType<number | undefined>(unicornsResult.exitCode);501- expectType<boolean>(unicornsResult.failed);502- expectType<boolean>(unicornsResult.timedOut);503- expectType<boolean>(unicornsResult.isCanceled);504- expectType<boolean>(unicornsResult.isTerminated);505- expectType<boolean>(unicornsResult.isMaxBuffer);506- expectType<string | undefined>(unicornsResult.signal);507- expectType<string | undefined>(unicornsResult.signalDescription);508- expectType<string>(unicornsResult.cwd);509- expectType<number>(unicornsResult.durationMs);510- expectType<ExecaResult[]>(unicornsResult.pipedFrom);511-512- expectType<undefined>(unicornsResult.stdio[0]);513- expectType<string>(unicornsResult.stdout);514- expectType<string>(unicornsResult.stdio[1]);515- expectType<string>(unicornsResult.stderr);516- expectType<string>(unicornsResult.stdio[2]);517- expectType<string>(unicornsResult.all);518- expectType<string | undefined>(unicornsResult.stdio[3 as number]);519-520- expectType<number | undefined>(execaBufferPromise.pid);521-522- expectType<boolean>(execa('unicorns', {ipc: true}).send({}));523- execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']}).send({});524- execa('unicorns', {stdio: ['pipe', 'pipe', 'ipc', 'pipe']}).send({});525- execa('unicorns', {ipc: true}).send('message');526- execa('unicorns', {ipc: true}).send({}, undefined, {keepOpen: true});527- expectError(execa('unicorns', {ipc: true}).send({}, true));528- expectType<undefined>(execa('unicorns', {}).send);529- expectType<undefined>(execa('unicorns', {ipc: false}).send);530- expectType<undefined>(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']}).send);531-532- expectType<Writable>(execaBufferPromise.stdin);533- expectType<Writable>(execaBufferPromise.stdio[0]);534- expectType<Readable>(execaBufferPromise.stdout);535- expectType<Readable>(execaBufferPromise.stdio[1]);536- expectType<Readable>(execaBufferPromise.stderr);537- expectType<Readable>(execaBufferPromise.stdio[2]);538- expectType<Readable>(execaBufferPromise.all);539- expectError(execaBufferPromise.stdio[3].destroy());540- expectType<Uint8Array>(bufferResult.stdout);541- expectType<Uint8Array>(bufferResult.stdio[1]);542- expectType<Uint8Array>(bufferResult.stderr);543- expectType<Uint8Array>(bufferResult.stdio[2]);544- expectType<Uint8Array>(bufferResult.all);545-546- expectType<Writable>(execaHexPromise.stdin);547- expectType<Writable>(execaHexPromise.stdio[0]);548- expectType<Readable>(execaHexPromise.stdout);549- expectType<Readable>(execaHexPromise.stdio[1]);550- expectType<Readable>(execaHexPromise.stderr);551- expectType<Readable>(execaHexPromise.stdio[2]);552- expectType<Readable>(execaHexPromise.all);553- expectError(execaHexPromise.stdio[3].destroy());554- expectType<string>(hexResult.stdout);555- expectType<string>(hexResult.stdio[1]);556- expectType<string>(hexResult.stderr);557- expectType<string>(hexResult.stdio[2]);558- expectType<string>(hexResult.all);559-560- const linesResult = await execa('unicorns', {lines: true, all: true});561- expectType<string[]>(linesResult.stdout);562- expectType<string[]>(linesResult.stdio[1]);563- expectType<string[]>(linesResult.stderr);564- expectType<string[]>(linesResult.stdio[2]);565- expectType<string[]>(linesResult.all);566-567- const linesBufferResult = await execa('unicorns', {lines: true, encoding: 'buffer', all: true});568- expectType<Uint8Array>(linesBufferResult.stdout);569- expectType<Uint8Array>(linesBufferResult.stdio[1]);570- expectType<Uint8Array>(linesBufferResult.stderr);571- expectType<Uint8Array>(linesBufferResult.stdio[2]);572- expectType<Uint8Array>(linesBufferResult.all);573-574- const linesHexResult = await execa('unicorns', {lines: true, encoding: 'hex', all: true});575- expectType<string>(linesHexResult.stdout);576- expectType<string>(linesHexResult.stdio[1]);577- expectType<string>(linesHexResult.stderr);578- expectType<string>(linesHexResult.stdio[2]);579- expectType<string>(linesHexResult.all);580-581- const noBufferPromise = execa('unicorns', {buffer: false, all: true});582- expectType<Writable>(noBufferPromise.stdin);583- expectType<Writable>(noBufferPromise.stdio[0]);584- expectType<Readable>(noBufferPromise.stdout);585- expectType<Readable>(noBufferPromise.stdio[1]);586- expectType<Readable>(noBufferPromise.stderr);587- expectType<Readable>(noBufferPromise.stdio[2]);588- expectType<Readable>(noBufferPromise.all);589- expectError(noBufferPromise.stdio[3].destroy());590- const noBufferResult = await noBufferPromise;591- expectType<undefined>(noBufferResult.stdout);592- expectType<undefined>(noBufferResult.stdio[1]);593- expectType<undefined>(noBufferResult.stderr);594- expectType<undefined>(noBufferResult.stdio[2]);595- expectType<undefined>(noBufferResult.all);596-597- const multipleStdinPromise = execa('unicorns', {stdin: ['inherit', 'pipe']});598- expectType<Writable>(multipleStdinPromise.stdin);599-600- const multipleStdoutPromise = execa('unicorns', {stdout: ['inherit', 'pipe'] as ['inherit', 'pipe'], all: true});601- expectType<Writable>(multipleStdoutPromise.stdin);602- expectType<Writable>(multipleStdoutPromise.stdio[0]);603- expectType<Readable>(multipleStdoutPromise.stdout);604- expectType<Readable>(multipleStdoutPromise.stdio[1]);605- expectType<Readable>(multipleStdoutPromise.stderr);606- expectType<Readable>(multipleStdoutPromise.stdio[2]);607- expectType<Readable>(multipleStdoutPromise.all);608- expectError(multipleStdoutPromise.stdio[3].destroy());609- const multipleStdoutResult = await multipleStdoutPromise;610- expectType<string>(multipleStdoutResult.stdout);611- expectType<string>(multipleStdoutResult.stdio[1]);612- expectType<string>(multipleStdoutResult.stderr);613- expectType<string>(multipleStdoutResult.stdio[2]);614- expectType<string>(multipleStdoutResult.all);615-616- const ignoreAnyPromise = execa('unicorns', {stdin: 'ignore', stdout: 'ignore', stderr: 'ignore', all: true});617- expectType<null>(ignoreAnyPromise.stdin);618- expectType<null>(ignoreAnyPromise.stdio[0]);619- expectType<null>(ignoreAnyPromise.stdout);620- expectType<null>(ignoreAnyPromise.stdio[1]);621- expectType<null>(ignoreAnyPromise.stderr);622- expectType<null>(ignoreAnyPromise.stdio[2]);623- expectType<undefined>(ignoreAnyPromise.all);624- expectError(ignoreAnyPromise.stdio[3].destroy());625- const ignoreAnyResult = await ignoreAnyPromise;626- expectType<undefined>(ignoreAnyResult.stdout);627- expectType<undefined>(ignoreAnyResult.stdio[1]);628- expectType<undefined>(ignoreAnyResult.stderr);629- expectType<undefined>(ignoreAnyResult.stdio[2]);630- expectType<undefined>(ignoreAnyResult.all);631-632- const ignoreAllPromise = execa('unicorns', {stdio: 'ignore', all: true});633- expectType<null>(ignoreAllPromise.stdin);634- expectType<null>(ignoreAllPromise.stdio[0]);635- expectType<null>(ignoreAllPromise.stdout);636- expectType<null>(ignoreAllPromise.stdio[1]);637- expectType<null>(ignoreAllPromise.stderr);638- expectType<null>(ignoreAllPromise.stdio[2]);639- expectType<undefined>(ignoreAllPromise.all);640- expectError(ignoreAllPromise.stdio[3].destroy());641- const ignoreAllResult = await ignoreAllPromise;642- expectType<undefined>(ignoreAllResult.stdout);643- expectType<undefined>(ignoreAllResult.stdio[1]);644- expectType<undefined>(ignoreAllResult.stderr);645- expectType<undefined>(ignoreAllResult.stdio[2]);646- expectType<undefined>(ignoreAllResult.all);647-648- const ignoreStdioArrayPromise = execa('unicorns', {stdio: ['ignore', 'ignore', 'pipe', 'pipe'], all: true});649- expectType<null>(ignoreStdioArrayPromise.stdin);650- expectType<null>(ignoreStdioArrayPromise.stdio[0]);651- expectType<null>(ignoreStdioArrayPromise.stdout);652- expectType<null>(ignoreStdioArrayPromise.stdio[1]);653- expectType<Readable>(ignoreStdioArrayPromise.stderr);654- expectType<Readable>(ignoreStdioArrayPromise.stdio[2]);655- expectType<Readable>(ignoreStdioArrayPromise.all);656- expectType<Readable>(ignoreStdioArrayPromise.stdio[3]);657- const ignoreStdioArrayResult = await ignoreStdioArrayPromise;658- expectType<undefined>(ignoreStdioArrayResult.stdout);659- expectType<undefined>(ignoreStdioArrayResult.stdio[1]);660- expectType<string>(ignoreStdioArrayResult.stderr);661- expectType<string>(ignoreStdioArrayResult.stdio[2]);662- expectType<string>(ignoreStdioArrayResult.all);663-664- const ignoreStdioArrayReadPromise = execa('unicorns', {stdio: ['ignore', 'ignore', 'pipe', new Uint8Array()], all: true});665- expectType<Writable>(ignoreStdioArrayReadPromise.stdio[3]);666-667- const ignoreStdinPromise = execa('unicorns', {stdin: 'ignore'});668- expectType<null>(ignoreStdinPromise.stdin);669-670- const ignoreStdoutPromise = execa('unicorns', {stdout: 'ignore', all: true});671- expectType<Writable>(ignoreStdoutPromise.stdin);672- expectType<Writable>(ignoreStdoutPromise.stdio[0]);673- expectType<null>(ignoreStdoutPromise.stdout);674- expectType<null>(ignoreStdoutPromise.stdio[1]);675- expectType<Readable>(ignoreStdoutPromise.stderr);676- expectType<Readable>(ignoreStdoutPromise.stdio[2]);677- expectType<Readable>(ignoreStdoutPromise.all);678- expectError(ignoreStdoutPromise.stdio[3].destroy());679- const ignoreStdoutResult = await ignoreStdoutPromise;680- expectType<undefined>(ignoreStdoutResult.stdout);681- expectType<string>(ignoreStdoutResult.stderr);682- expectType<string>(ignoreStdoutResult.all);683-684- const ignoreStderrPromise = execa('unicorns', {stderr: 'ignore', all: true});685- expectType<Writable>(ignoreStderrPromise.stdin);686- expectType<Writable>(ignoreStderrPromise.stdio[0]);687- expectType<Readable>(ignoreStderrPromise.stdout);688- expectType<Readable>(ignoreStderrPromise.stdio[1]);689- expectType<null>(ignoreStderrPromise.stderr);690- expectType<null>(ignoreStderrPromise.stdio[2]);691- expectType<Readable>(ignoreStderrPromise.all);692- expectError(ignoreStderrPromise.stdio[3].destroy());693- const ignoreStderrResult = await ignoreStderrPromise;694- expectType<string>(ignoreStderrResult.stdout);695- expectType<undefined>(ignoreStderrResult.stderr);696- expectType<string>(ignoreStderrResult.all);697-698- const ignoreStdioPromise = execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore'], all: true});699- expectType<Writable>(ignoreStdioPromise.stdin);700- expectType<Writable>(ignoreStdioPromise.stdio[0]);701- expectType<Readable>(ignoreStdioPromise.stdout);702- expectType<Readable>(ignoreStdioPromise.stdio[1]);703- expectType<Readable>(ignoreStdioPromise.stderr);704- expectType<Readable>(ignoreStdioPromise.stdio[2]);705- expectType<Readable>(ignoreStdioPromise.all);706- expectType<null>(ignoreStdioPromise.stdio[3]);707- const ignoreStdioResult = await ignoreStdioPromise;708- expectType<string>(ignoreStdioResult.stdout);709- expectType<string>(ignoreStdioResult.stderr);710- expectType<string>(ignoreStdioResult.all);711-712- const inheritStdoutResult = await execa('unicorns', {stdout: 'inherit', all: true});713- expectType<undefined>(inheritStdoutResult.stdout);714- expectType<string>(inheritStdoutResult.stderr);715- expectType<string>(inheritStdoutResult.all);716-717- const inheritArrayStdoutResult = await execa('unicorns', {stdout: ['inherit'] as ['inherit'], all: true});718- expectType<undefined>(inheritArrayStdoutResult.stdout);719- expectType<string>(inheritArrayStdoutResult.stderr);720- expectType<string>(inheritArrayStdoutResult.all);721-722- const inheritStderrResult = await execa('unicorns', {stderr: 'inherit', all: true});723- expectType<string>(inheritStderrResult.stdout);724- expectType<undefined>(inheritStderrResult.stderr);725- expectType<string>(inheritStderrResult.all);726-727- const inheritArrayStderrResult = await execa('unicorns', {stderr: ['inherit'] as ['inherit'], all: true});728- expectType<string>(inheritArrayStderrResult.stdout);729- expectType<undefined>(inheritArrayStderrResult.stderr);730- expectType<string>(inheritArrayStderrResult.all);731-732- const ipcStdoutResult = await execa('unicorns', {stdout: 'ipc', all: true});733- expectType<undefined>(ipcStdoutResult.stdout);734- expectType<string>(ipcStdoutResult.stderr);735- expectType<string>(ipcStdoutResult.all);736-737- const ipcStderrResult = await execa('unicorns', {stderr: 'ipc', all: true});738- expectType<string>(ipcStderrResult.stdout);739- expectType<undefined>(ipcStderrResult.stderr);740- expectType<string>(ipcStderrResult.all);741-742- const numberStdoutResult = await execa('unicorns', {stdout: 1, all: true});743- expectType<undefined>(numberStdoutResult.stdout);744- expectType<string>(numberStdoutResult.stderr);745- expectType<string>(numberStdoutResult.all);746-747- const numberArrayStdoutResult = await execa('unicorns', {stdout: [1] as [1], all: true});748- expectType<undefined>(numberArrayStdoutResult.stdout);749- expectType<string>(numberArrayStdoutResult.stderr);750- expectType<string>(numberArrayStdoutResult.all);751-752- const numberStderrResult = await execa('unicorns', {stderr: 1, all: true});753- expectType<string>(numberStderrResult.stdout);754- expectType<undefined>(numberStderrResult.stderr);755- expectType<string>(numberStderrResult.all);756-757- const numberArrayStderrResult = await execa('unicorns', {stderr: [1] as [1], all: true});758- expectType<string>(numberArrayStderrResult.stdout);759- expectType<undefined>(numberArrayStderrResult.stderr);760- expectType<string>(numberArrayStderrResult.all);761-762- const streamStdoutResult = await execa('unicorns', {stdout: process.stdout, all: true});763- expectType<undefined>(streamStdoutResult.stdout);764- expectType<string>(streamStdoutResult.stderr);765- expectType<string>(streamStdoutResult.all);766-767- const streamArrayStdoutResult = await execa('unicorns', {stdout: [process.stdout] as [typeof process.stdout], all: true});768- expectType<undefined>(streamArrayStdoutResult.stdout);769- expectType<string>(streamArrayStdoutResult.stderr);770- expectType<string>(streamArrayStdoutResult.all);771-772- const streamStderrResult = await execa('unicorns', {stderr: process.stdout, all: true});773- expectType<string>(streamStderrResult.stdout);774- expectType<undefined>(streamStderrResult.stderr);775- expectType<string>(streamStderrResult.all);776-777- const streamArrayStderrResult = await execa('unicorns', {stderr: [process.stdout] as [typeof process.stdout], all: true});778- expectType<string>(streamArrayStderrResult.stdout);779- expectType<undefined>(streamArrayStderrResult.stderr);780- expectType<string>(streamArrayStderrResult.all);781-782- const undefinedStdoutResult = await execa('unicorns', {stdout: undefined, all: true});783- expectType<string>(undefinedStdoutResult.stdout);784- expectType<string>(undefinedStdoutResult.stderr);785- expectType<string>(undefinedStdoutResult.all);786-787- const undefinedArrayStdoutResult = await execa('unicorns', {stdout: [undefined] as const, all: true});788- expectType<string>(undefinedArrayStdoutResult.stdout);789- expectType<string>(undefinedArrayStdoutResult.stderr);790- expectType<string>(undefinedArrayStdoutResult.all);791-792- const undefinedStderrResult = await execa('unicorns', {stderr: undefined, all: true});793- expectType<string>(undefinedStderrResult.stdout);794- expectType<string>(undefinedStderrResult.stderr);795- expectType<string>(undefinedStderrResult.all);796-797- const undefinedArrayStderrResult = await execa('unicorns', {stderr: [undefined] as const, all: true});798- expectType<string>(undefinedArrayStderrResult.stdout);799- expectType<string>(undefinedArrayStderrResult.stderr);800- expectType<string>(undefinedArrayStderrResult.all);801-802- const fd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});803- expectType<string>(fd3Result.stdio[3]);804-805- const inputFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe', new Readable()]]});806- expectType<undefined>(inputFd3Result.stdio[3]);807-808- const outputFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe', new Writable()]]});809- expectType<string>(outputFd3Result.stdio[3]);810-811- const bufferFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], encoding: 'buffer'});812- expectType<Uint8Array>(bufferFd3Result.stdio[3]);813-814- const linesFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], lines: true});815- expectType<string[]>(linesFd3Result.stdio[3]);816-817- const linesBufferFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], lines: true, encoding: 'buffer'});818- expectType<Uint8Array>(linesBufferFd3Result.stdio[3]);819-820- const noBufferFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe'], buffer: false});821- expectType<undefined>(noBufferFd3Result.stdio[3]);822-823- const ignoreFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});824- expectType<undefined>(ignoreFd3Result.stdio[3]);825-826- const undefinedFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});827- expectType<undefined>(undefinedFd3Result.stdio[3]);828-829- const undefinedArrayFd3Result = await execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined] as const]});830- expectType<undefined>(undefinedArrayFd3Result.stdio[3]);831-832- const objectTransformLinesStdoutResult = await execa('unicorns', {lines: true, stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}});833- expectType<unknown[]>(objectTransformLinesStdoutResult.stdout);834- expectType<[undefined, unknown[], string[]]>(objectTransformLinesStdoutResult.stdio);835-836- const objectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransformObject});837- expectType<unknown[]>(objectWebTransformStdoutResult.stdout);838- expectType<[undefined, unknown[], string]>(objectWebTransformStdoutResult.stdio);839-840- const objectDuplexStdoutResult = await execa('unicorns', {stdout: duplexObject});841- expectType<unknown[]>(objectDuplexStdoutResult.stdout);842- expectType<[undefined, unknown[], string]>(objectDuplexStdoutResult.stdio);843-844- const objectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: duplexObjectProperty});845- expectType<unknown[]>(objectDuplexPropertyStdoutResult.stdout);846- expectType<[undefined, unknown[], string]>(objectDuplexPropertyStdoutResult.stdio);847-848- const objectTransformStdoutResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}});849- expectType<unknown[]>(objectTransformStdoutResult.stdout);850- expectType<[undefined, unknown[], string]>(objectTransformStdoutResult.stdio);851-852- const objectWebTransformStderrResult = await execa('unicorns', {stderr: webTransformObject});853- expectType<unknown[]>(objectWebTransformStderrResult.stderr);854- expectType<[undefined, string, unknown[]]>(objectWebTransformStderrResult.stdio);855-856- const objectDuplexStderrResult = await execa('unicorns', {stderr: duplexObject});857- expectType<unknown[]>(objectDuplexStderrResult.stderr);858- expectType<[undefined, string, unknown[]]>(objectDuplexStderrResult.stdio);859-860- const objectDuplexPropertyStderrResult = await execa('unicorns', {stderr: duplexObjectProperty});861- expectType<unknown[]>(objectDuplexPropertyStderrResult.stderr);862- expectType<[undefined, string, unknown[]]>(objectDuplexPropertyStderrResult.stdio);863-864- const objectTransformStderrResult = await execa('unicorns', {stderr: {transform: objectGenerator, final: objectFinal, objectMode: true}});865- expectType<unknown[]>(objectTransformStderrResult.stderr);866- expectType<[undefined, string, unknown[]]>(objectTransformStderrResult.stdio);867-868- const objectWebTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', webTransformObject]});869- expectType<unknown[]>(objectWebTransformStdioResult.stderr);870- expectType<[undefined, string, unknown[]]>(objectWebTransformStdioResult.stdio);871-872- const objectDuplexStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexObject]});873- expectType<unknown[]>(objectDuplexStdioResult.stderr);874- expectType<[undefined, string, unknown[]]>(objectDuplexStdioResult.stdio);875-876- const objectDuplexPropertyStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexObjectProperty]});877- expectType<unknown[]>(objectDuplexPropertyStdioResult.stderr);878- expectType<[undefined, string, unknown[]]>(objectDuplexPropertyStdioResult.stdio);879-880- const objectTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', {transform: objectGenerator, final: objectFinal, objectMode: true}]});881- expectType<unknown[]>(objectTransformStdioResult.stderr);882- expectType<[undefined, string, unknown[]]>(objectTransformStdioResult.stdio);883-884- const singleObjectWebTransformStdoutResult = await execa('unicorns', {stdout: [webTransformObject]});885- expectType<unknown[]>(singleObjectWebTransformStdoutResult.stdout);886- expectType<[undefined, unknown[], string]>(singleObjectWebTransformStdoutResult.stdio);887-888- const singleObjectDuplexStdoutResult = await execa('unicorns', {stdout: [duplexObject]});889- expectType<unknown[]>(singleObjectDuplexStdoutResult.stdout);890- expectType<[undefined, unknown[], string]>(singleObjectDuplexStdoutResult.stdio);891-892- const singleObjectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: [duplexObjectProperty]});893- expectType<unknown[]>(singleObjectDuplexPropertyStdoutResult.stdout);894- expectType<[undefined, unknown[], string]>(singleObjectDuplexPropertyStdoutResult.stdio);895-896- const singleObjectTransformStdoutResult = await execa('unicorns', {stdout: [{transform: objectGenerator, final: objectFinal, objectMode: true}]});897- expectType<unknown[]>(singleObjectTransformStdoutResult.stdout);898- expectType<[undefined, unknown[], string]>(singleObjectTransformStdoutResult.stdio);899-900- const manyObjectWebTransformStdoutResult = await execa('unicorns', {stdout: [webTransformObject, webTransformObject]});901- expectType<unknown[]>(manyObjectWebTransformStdoutResult.stdout);902- expectType<[undefined, unknown[], string]>(manyObjectWebTransformStdoutResult.stdio);903-904- const manyObjectDuplexStdoutResult = await execa('unicorns', {stdout: [duplexObject, duplexObject]});905- expectType<unknown[]>(manyObjectDuplexStdoutResult.stdout);906- expectType<[undefined, unknown[], string]>(manyObjectDuplexStdoutResult.stdio);907-908- const manyObjectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: [duplexObjectProperty, duplexObjectProperty]});909- expectType<unknown[]>(manyObjectDuplexPropertyStdoutResult.stdout);910- expectType<[undefined, unknown[], string]>(manyObjectDuplexPropertyStdoutResult.stdio);911-912- const manyObjectTransformStdoutResult = await execa('unicorns', {stdout: [{transform: objectGenerator, final: objectFinal, objectMode: true}, {transform: objectGenerator, final: objectFinal, objectMode: true}]});913- expectType<unknown[]>(manyObjectTransformStdoutResult.stdout);914- expectType<[undefined, unknown[], string]>(manyObjectTransformStdoutResult.stdio);915-916- const falseObjectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransformNotObject});917- expectType<string>(falseObjectWebTransformStdoutResult.stdout);918- expectType<[undefined, string, string]>(falseObjectWebTransformStdoutResult.stdio);919-920- const falseObjectDuplexStdoutResult = await execa('unicorns', {stdout: duplexNotObject});921- expectType<string>(falseObjectDuplexStdoutResult.stdout);922- expectType<[undefined, string, string]>(falseObjectDuplexStdoutResult.stdio);923-924- const falseObjectDuplexPropertyStdoutResult = await execa('unicorns', {stdout: duplexNotObjectProperty});925- expectType<string>(falseObjectDuplexPropertyStdoutResult.stdout);926- expectType<[undefined, string, string]>(falseObjectDuplexPropertyStdoutResult.stdio);927-928- const falseObjectTransformStdoutResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: false}});929- expectType<string>(falseObjectTransformStdoutResult.stdout);930- expectType<[undefined, string, string]>(falseObjectTransformStdoutResult.stdio);931-932- const falseObjectWebTransformStderrResult = await execa('unicorns', {stderr: webTransformNotObject});933- expectType<string>(falseObjectWebTransformStderrResult.stderr);934- expectType<[undefined, string, string]>(falseObjectWebTransformStderrResult.stdio);935-936- const falseObjectDuplexStderrResult = await execa('unicorns', {stderr: duplexNotObject});937- expectType<string>(falseObjectDuplexStderrResult.stderr);938- expectType<[undefined, string, string]>(falseObjectDuplexStderrResult.stdio);939-940- const falseObjectDuplexPropertyStderrResult = await execa('unicorns', {stderr: duplexNotObjectProperty});941- expectType<string>(falseObjectDuplexPropertyStderrResult.stderr);942- expectType<[undefined, string, string]>(falseObjectDuplexPropertyStderrResult.stdio);943-944- const falseObjectTransformStderrResult = await execa('unicorns', {stderr: {transform: objectGenerator, final: objectFinal, objectMode: false}});945- expectType<string>(falseObjectTransformStderrResult.stderr);946- expectType<[undefined, string, string]>(falseObjectTransformStderrResult.stdio);947-948- const falseObjectWebTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', webTransformNotObject]});949- expectType<string>(falseObjectWebTransformStdioResult.stderr);950- expectType<[undefined, string, string]>(falseObjectWebTransformStdioResult.stdio);951-952- const falseObjectDuplexStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexNotObject]});953- expectType<string>(falseObjectDuplexStdioResult.stderr);954- expectType<[undefined, string, string]>(falseObjectDuplexStdioResult.stdio);955-956- const falseObjectDuplexPropertyStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', duplexNotObjectProperty]});957- expectType<string>(falseObjectDuplexPropertyStdioResult.stderr);958- expectType<[undefined, string, string]>(falseObjectDuplexPropertyStdioResult.stdio);959-960- const falseObjectTransformStdioResult = await execa('unicorns', {stdio: ['pipe', 'pipe', {transform: objectGenerator, final: objectFinal, objectMode: false}]});961- expectType<string>(falseObjectTransformStdioResult.stderr);962- expectType<[undefined, string, string]>(falseObjectTransformStdioResult.stdio);963-964- const topObjectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransformInstance});965- expectType<string>(topObjectWebTransformStdoutResult.stdout);966- expectType<[undefined, string, string]>(topObjectWebTransformStdoutResult.stdio);967-968- const undefinedObjectWebTransformStdoutResult = await execa('unicorns', {stdout: webTransform});969- expectType<string>(undefinedObjectWebTransformStdoutResult.stdout);970- expectType<[undefined, string, string]>(undefinedObjectWebTransformStdoutResult.stdio);971-972- const undefinedObjectDuplexStdoutResult = await execa('unicorns', {stdout: duplex});973- expectType<string | unknown[]>(undefinedObjectDuplexStdoutResult.stdout);974- expectType<[undefined, string | unknown[], string]>(undefinedObjectDuplexStdoutResult.stdio);975-976- const undefinedObjectTransformStdoutResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal}});977- expectType<string>(undefinedObjectTransformStdoutResult.stdout);978- expectType<[undefined, string, string]>(undefinedObjectTransformStdoutResult.stdio);979-980- const noObjectTransformStdoutResult = await execa('unicorns', {stdout: objectGenerator, final: objectFinal});981- expectType<string>(noObjectTransformStdoutResult.stdout);982- expectType<[undefined, string, string]>(noObjectTransformStdoutResult.stdio);983-984- const trueTrueObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: true}, all: true});985- expectType<unknown[]>(trueTrueObjectTransformResult.stdout);986- expectType<unknown[]>(trueTrueObjectTransformResult.stderr);987- expectType<unknown[]>(trueTrueObjectTransformResult.all);988- expectType<[undefined, unknown[], unknown[]]>(trueTrueObjectTransformResult.stdio);989-990- const trueFalseObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: true}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: false}, all: true});991- expectType<unknown[]>(trueFalseObjectTransformResult.stdout);992- expectType<string>(trueFalseObjectTransformResult.stderr);993- expectType<unknown[]>(trueFalseObjectTransformResult.all);994- expectType<[undefined, unknown[], string]>(trueFalseObjectTransformResult.stdio);995-996- const falseTrueObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: false}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: true}, all: true});997- expectType<string>(falseTrueObjectTransformResult.stdout);998- expectType<unknown[]>(falseTrueObjectTransformResult.stderr);999- expectType<unknown[]>(falseTrueObjectTransformResult.all);1000- expectType<[undefined, string, unknown[]]>(falseTrueObjectTransformResult.stdio);1001-1002- const falseFalseObjectTransformResult = await execa('unicorns', {stdout: {transform: objectGenerator, final: objectFinal, objectMode: false}, stderr: {transform: objectGenerator, final: objectFinal, objectMode: false}, all: true});1003- expectType<string>(falseFalseObjectTransformResult.stdout);1004- expectType<string>(falseFalseObjectTransformResult.stderr);1005- expectType<string>(falseFalseObjectTransformResult.all);1006- expectType<[undefined, string, string]>(falseFalseObjectTransformResult.stdio);1007-} catch (error: unknown) {1008- if (error instanceof ExecaError) {1009- expectAssignable<ExecaError>(error);1010- expectType<'ExecaError'>(error.name);1011- expectType<string>(error.message);1012- expectType<number | undefined>(error.exitCode);1013- expectType<boolean>(error.failed);1014- expectType<boolean>(error.timedOut);1015- expectType<boolean>(error.isCanceled);1016- expectType<boolean>(error.isTerminated);1017- expectType<boolean>(error.isMaxBuffer);1018- expectType<string | undefined>(error.signal);1019- expectType<string | undefined>(error.signalDescription);1020- expectType<string>(error.cwd);1021- expectType<number>(error.durationMs);1022- expectType<string>(error.shortMessage);1023- expectType<string>(error.originalMessage);1024- expectType<string | undefined>(error.code);1025- expectType<unknown>(error.cause);1026- expectType<ExecaResult[]>(error.pipedFrom);1027- }1028-1029- const noAllError = error as ExecaError<{}>;1030- expectType<undefined>(noAllError.stdio[0]);1031- expectType<undefined>(noAllError.all);1032-1033- const execaStringError = error as ExecaError<{all: true}>;1034- expectType<string>(execaStringError.stdout);1035- expectType<string>(execaStringError.stdio[1]);1036- expectType<string>(execaStringError.stderr);1037- expectType<string>(execaStringError.stdio[2]);1038- expectType<string>(execaStringError.all);1039-1040- const execaBufferError = error as ExecaError<{encoding: 'buffer'; all: true}>;1041- expectType<Uint8Array>(execaBufferError.stdout);1042- expectType<Uint8Array>(execaBufferError.stdio[1]);1043- expectType<Uint8Array>(execaBufferError.stderr);1044- expectType<Uint8Array>(execaBufferError.stdio[2]);1045- expectType<Uint8Array>(execaBufferError.all);1046-1047- const execaLinesError = error as ExecaError<{lines: true; all: true}>;1048- expectType<string[]>(execaLinesError.stdout);1049- expectType<string[]>(execaLinesError.stdio[1]);1050- expectType<string[]>(execaLinesError.stderr);1051- expectType<string[]>(execaLinesError.stdio[2]);1052- expectType<string[]>(execaLinesError.all);1053-1054- const execaLinesBufferError = error as ExecaError<{lines: true; encoding: 'buffer'; all: true}>;1055- expectType<Uint8Array>(execaLinesBufferError.stdout);1056- expectType<Uint8Array>(execaLinesBufferError.stdio[1]);1057- expectType<Uint8Array>(execaLinesBufferError.stderr);1058- expectType<Uint8Array>(execaLinesBufferError.stdio[2]);1059- expectType<Uint8Array>(execaLinesBufferError.all);1060-1061- const noBufferError = error as ExecaError<{buffer: false; all: true}>;1062- expectType<undefined>(noBufferError.stdout);1063- expectType<undefined>(noBufferError.stdio[1]);1064- expectType<undefined>(noBufferError.stderr);1065- expectType<undefined>(noBufferError.stdio[2]);1066- expectType<undefined>(noBufferError.all);1067-1068- const ignoreStdoutError = error as ExecaError<{stdout: 'ignore'; all: true}>;1069- expectType<undefined>(ignoreStdoutError.stdout);1070- expectType<undefined>(ignoreStdoutError.stdio[1]);1071- expectType<string>(ignoreStdoutError.stderr);1072- expectType<string>(ignoreStdoutError.stdio[2]);1073- expectType<string>(ignoreStdoutError.all);1074-1075- const ignoreStderrError = error as ExecaError<{stderr: 'ignore'; all: true}>;1076- expectType<string>(ignoreStderrError.stdout);1077- expectType<undefined>(ignoreStderrError.stderr);1078- expectType<string>(ignoreStderrError.all);1079-1080- const inheritStdoutError = error as ExecaError<{stdout: 'inherit'; all: true}>;1081- expectType<undefined>(inheritStdoutError.stdout);1082- expectType<string>(inheritStdoutError.stderr);1083- expectType<string>(inheritStdoutError.all);1084-1085- const inheritStderrError = error as ExecaError<{stderr: 'inherit'; all: true}>;1086- expectType<string>(inheritStderrError.stdout);1087- expectType<undefined>(inheritStderrError.stderr);1088- expectType<string>(inheritStderrError.all);1089-1090- const ipcStdoutError = error as ExecaError<{stdout: 'ipc'; all: true}>;1091- expectType<undefined>(ipcStdoutError.stdout);1092- expectType<string>(ipcStdoutError.stderr);1093- expectType<string>(ipcStdoutError.all);1094-1095- const ipcStderrError = error as ExecaError<{stderr: 'ipc'; all: true}>;1096- expectType<string>(ipcStderrError.stdout);1097- expectType<undefined>(ipcStderrError.stderr);1098- expectType<string>(ipcStderrError.all);1099-1100- const numberStdoutError = error as ExecaError<{stdout: 1; all: true}>;1101- expectType<undefined>(numberStdoutError.stdout);1102- expectType<string>(numberStdoutError.stderr);1103- expectType<string>(numberStdoutError.all);1104-1105- const numberStderrError = error as ExecaError<{stderr: 1; all: true}>;1106- expectType<string>(numberStderrError.stdout);1107- expectType<undefined>(numberStderrError.stderr);1108- expectType<string>(numberStderrError.all);1109-1110- const streamStdoutError = error as ExecaError<{stdout: typeof process.stdout; all: true}>;1111- expectType<undefined>(streamStdoutError.stdout);1112- expectType<string>(streamStdoutError.stderr);1113- expectType<string>(streamStdoutError.all);1114-1115- const streamStderrError = error as ExecaError<{stderr: typeof process.stdout; all: true}>;1116- expectType<string>(streamStderrError.stdout);1117- expectType<undefined>(streamStderrError.stderr);1118- expectType<string>(streamStderrError.all);1119-1120- const objectTransformStdoutError = error as ExecaError<{stdout: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: true}}>;1121- expectType<unknown[]>(objectTransformStdoutError.stdout);1122- expectType<[undefined, unknown[], string]>(objectTransformStdoutError.stdio);1123-1124- const objectTransformStderrError = error as ExecaError<{stderr: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: true}}>;1125- expectType<unknown[]>(objectTransformStderrError.stderr);1126- expectType<[undefined, string, unknown[]]>(objectTransformStderrError.stdio);1127-1128- const objectTransformStdioError = error as ExecaError<{stdio: ['pipe', 'pipe', {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: true}]}>;1129- expectType<unknown[]>(objectTransformStdioError.stderr);1130- expectType<[undefined, string, unknown[]]>(objectTransformStdioError.stdio);1131-1132- const falseObjectTransformStdoutError = error as ExecaError<{stdout: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: false}}>;1133- expectType<string>(falseObjectTransformStdoutError.stdout);1134- expectType<[undefined, string, string]>(falseObjectTransformStdoutError.stdio);1135-1136- const falseObjectTransformStderrError = error as ExecaError<{stderr: {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: false}}>;1137- expectType<string>(falseObjectTransformStderrError.stderr);1138- expectType<[undefined, string, string]>(falseObjectTransformStderrError.stdio);1139-1140- const falseObjectTransformStdioError = error as ExecaError<{stdio: ['pipe', 'pipe', {transform: typeof objectGenerator; final: typeof objectFinal; objectMode: false}]}>;1141- expectType<string>(falseObjectTransformStdioError.stderr);1142- expectType<[undefined, string, string]>(falseObjectTransformStdioError.stdio);1143-}1144-1145-const rejectsResult = await execa('unicorns');1146-expectError(rejectsResult.stack?.toString());1147-expectError(rejectsResult.message?.toString());1148-expectError(rejectsResult.shortMessage?.toString());1149-expectError(rejectsResult.originalMessage?.toString());1150-expectError(rejectsResult.code?.toString());1151-expectError(rejectsResult.cause?.valueOf());1152-1153-const noRejectsResult = await execa('unicorns', {reject: false});1154-expectType<string | undefined>(noRejectsResult.stack);1155-expectType<string | undefined>(noRejectsResult.message);1156-expectType<string | undefined>(noRejectsResult.shortMessage);1157-expectType<string | undefined>(noRejectsResult.originalMessage);1158-expectType<string | undefined>(noRejectsResult.code);1159-expectType<unknown>(noRejectsResult.cause);1160-1161-try {1162- const unicornsResult = execaSync('unicorns', {all: true});1163-1164- expectAssignable<ExecaSyncResult>(unicornsResult);1165- expectType<string>(unicornsResult.command);1166- expectType<string>(unicornsResult.escapedCommand);1167- expectType<number | undefined>(unicornsResult.exitCode);1168- expectError(unicornsResult.pipe);1169- expectType<boolean>(unicornsResult.failed);1170- expectType<boolean>(unicornsResult.timedOut);1171- expectType<boolean>(unicornsResult.isCanceled);1172- expectType<boolean>(unicornsResult.isTerminated);1173- expectType<boolean>(unicornsResult.isMaxBuffer);1174- expectType<string | undefined>(unicornsResult.signal);1175- expectType<string | undefined>(unicornsResult.signalDescription);1176- expectType<string>(unicornsResult.cwd);1177- expectType<number>(unicornsResult.durationMs);1178- expectType<[]>(unicornsResult.pipedFrom);1179-1180- expectType<undefined>(unicornsResult.stdio[0]);1181- expectType<string>(unicornsResult.stdout);1182- expectType<string>(unicornsResult.stdio[1]);1183- expectType<string>(unicornsResult.stderr);1184- expectType<string>(unicornsResult.stdio[2]);1185- expectType<string>(unicornsResult.all);1186-1187- const bufferResult = execaSync('unicorns', {encoding: 'buffer', all: true});1188- expectType<Uint8Array>(bufferResult.stdout);1189- expectType<Uint8Array>(bufferResult.stdio[1]);1190- expectType<Uint8Array>(bufferResult.stderr);1191- expectType<Uint8Array>(bufferResult.stdio[2]);1192- expectType<Uint8Array>(bufferResult.all);1193-1194- const linesResult = execaSync('unicorns', {lines: true, all: true});1195- expectType<string[]>(linesResult.stdout);1196- expectType<string[]>(linesResult.stderr);1197- expectType<string[]>(linesResult.all);1198-1199- const linesBufferResult = execaSync('unicorns', {lines: true, encoding: 'buffer', all: true});1200- expectType<Uint8Array>(linesBufferResult.stdout);1201- expectType<Uint8Array>(linesBufferResult.stderr);1202- expectType<Uint8Array>(linesBufferResult.all);1203-1204- const linesHexResult = execaSync('unicorns', {lines: true, encoding: 'hex', all: true});1205- expectType<string>(linesHexResult.stdout);1206- expectType<string>(linesHexResult.stderr);1207- expectType<string>(linesHexResult.all);1208-1209- const noBufferResult = execaSync('unicorns', {buffer: false, all: true});1210- expectType<undefined>(noBufferResult.stdout);1211- expectType<undefined>(noBufferResult.stderr);1212- expectType<undefined>(noBufferResult.all);1213-1214- const ignoreStdoutResult = execaSync('unicorns', {stdout: 'ignore', all: true});1215- expectType<undefined>(ignoreStdoutResult.stdout);1216- expectType<undefined>(ignoreStdoutResult.stdio[1]);1217- expectType<string>(ignoreStdoutResult.stderr);1218- expectType<string>(ignoreStdoutResult.stdio[2]);1219- expectType<string>(ignoreStdoutResult.all);1220-1221- const ignoreStderrResult = execaSync('unicorns', {stderr: 'ignore', all: true});1222- expectType<string>(ignoreStderrResult.stdout);1223- expectType<undefined>(ignoreStderrResult.stderr);1224- expectType<string>(ignoreStderrResult.all);1225-1226- const inheritStdoutResult = execaSync('unicorns', {stdout: 'inherit', all: true});1227- expectType<undefined>(inheritStdoutResult.stdout);1228- expectType<string>(inheritStdoutResult.stderr);1229- expectType<string>(inheritStdoutResult.all);1230-1231- const inheritStderrResult = execaSync('unicorns', {stderr: 'inherit', all: true});1232- expectType<string>(inheritStderrResult.stdout);1233- expectType<undefined>(inheritStderrResult.stderr);1234- expectType<string>(inheritStderrResult.all);1235-1236- const numberStdoutResult = execaSync('unicorns', {stdout: 1, all: true});1237- expectType<undefined>(numberStdoutResult.stdout);1238- expectType<string>(numberStdoutResult.stderr);1239- expectType<string>(numberStdoutResult.all);1240-1241- const numberStderrResult = execaSync('unicorns', {stderr: 1, all: true});1242- expectType<string>(numberStderrResult.stdout);1243- expectType<undefined>(numberStderrResult.stderr);1244- expectType<string>(numberStderrResult.all);1245-} catch (error: unknown) {1246- if (error instanceof ExecaSyncError) {1247- expectAssignable<ExecaSyncError>(error);1248- expectType<'ExecaSyncError'>(error.name);1249- expectType<string>(error.message);1250- expectType<number | undefined>(error.exitCode);1251- expectType<boolean>(error.failed);1252- expectType<boolean>(error.timedOut);1253- expectType<boolean>(error.isCanceled);1254- expectType<boolean>(error.isTerminated);1255- expectType<boolean>(error.isMaxBuffer);1256- expectType<string | undefined>(error.signal);1257- expectType<string | undefined>(error.signalDescription);1258- expectType<string>(error.cwd);1259- expectType<number>(error.durationMs);1260- expectType<string>(error.shortMessage);1261- expectType<string>(error.originalMessage);1262- expectType<string | undefined>(error.code);1263- expectType<unknown>(error.cause);1264- expectType<[]>(error.pipedFrom);1265- }1266-1267- const execaStringError = error as ExecaSyncError<{all: true}>;1268- expectType<undefined>(execaStringError.stdio[0]);1269- expectType<string>(execaStringError.stdout);1270- expectType<string>(execaStringError.stdio[1]);1271- expectType<string>(execaStringError.stderr);1272- expectType<string>(execaStringError.stdio[2]);1273- expectType<string>(execaStringError.all);1274-1275- const execaBufferError = error as ExecaSyncError<{encoding: 'buffer'; all: true}>;1276- expectType<Uint8Array>(execaBufferError.stdout);1277- expectType<Uint8Array>(execaBufferError.stdio[1]);1278- expectType<Uint8Array>(execaBufferError.stderr);1279- expectType<Uint8Array>(execaBufferError.stdio[2]);1280- expectType<Uint8Array>(execaBufferError.all);1281-1282- const execaLinesError = error as ExecaSyncError<{lines: true; all: true}>;1283- expectType<string[]>(execaLinesError.stdout);1284- expectType<string[]>(execaLinesError.stderr);1285- expectType<string[]>(execaLinesError.all);1286-1287- const execaLinesBufferError = error as ExecaSyncError<{lines: true; encoding: 'buffer'; all: true}>;1288- expectType<Uint8Array>(execaLinesBufferError.stdout);1289- expectType<Uint8Array>(execaLinesBufferError.stderr);1290- expectType<Uint8Array>(execaLinesBufferError.all);1291-1292- const noBufferError = error as ExecaSyncError<{buffer: false; all: true}>;1293- expectType<undefined>(noBufferError.stdout);1294- expectType<undefined>(noBufferError.stderr);1295- expectType<undefined>(noBufferError.all);1296-1297- const ignoreStdoutError = error as ExecaSyncError<{stdout: 'ignore'; all: true}>;1298- expectType<undefined>(ignoreStdoutError.stdout);1299- expectType<undefined>(ignoreStdoutError.stdio[1]);1300- expectType<string>(ignoreStdoutError.stderr);1301- expectType<string>(ignoreStdoutError.stdio[2]);1302- expectType<string>(ignoreStdoutError.all);1303-1304- const ignoreStderrError = error as ExecaSyncError<{stderr: 'ignore'; all: true}>;1305- expectType<string>(ignoreStderrError.stdout);1306- expectType<undefined>(ignoreStderrError.stderr);1307- expectType<string>(ignoreStderrError.all);1308-1309- const inheritStdoutError = error as ExecaSyncError<{stdout: 'inherit'; all: true}>;1310- expectType<undefined>(inheritStdoutError.stdout);1311- expectType<string>(inheritStdoutError.stderr);1312- expectType<string>(inheritStdoutError.all);1313-1314- const inheritStderrError = error as ExecaSyncError<{stderr: 'inherit'; all: true}>;1315- expectType<string>(inheritStderrError.stdout);1316- expectType<undefined>(inheritStderrError.stderr);1317- expectType<string>(inheritStderrError.all);1318-1319- const numberStdoutError = error as ExecaSyncError<{stdout: 1; all: true}>;1320- expectType<undefined>(numberStdoutError.stdout);1321- expectType<string>(numberStdoutError.stderr);1322- expectType<string>(numberStdoutError.all);1323-1324- const numberStderrError = error as ExecaSyncError<{stderr: 1; all: true}>;1325- expectType<string>(numberStderrError.stdout);1326- expectType<undefined>(numberStderrError.stderr);1327- expectType<string>(numberStderrError.all);1328-}1329-1330-const rejectsSyncResult = execaSync('unicorns');1331-expectError(rejectsSyncResult.stack?.toString());1332-expectError(rejectsSyncResult.message?.toString());1333-expectError(rejectsSyncResult.shortMessage?.toString());1334-expectError(rejectsSyncResult.originalMessage?.toString());1335-expectError(rejectsSyncResult.code?.toString());1336-expectError(rejectsSyncResult.cause?.valueOf());1337-1338-const noRejectsSyncResult = execaSync('unicorns', {reject: false});1339-expectType<string | undefined>(noRejectsSyncResult.stack);1340-expectType<string | undefined>(noRejectsSyncResult.message);1341-expectType<string | undefined>(noRejectsSyncResult.shortMessage);1342-expectType<string | undefined>(noRejectsSyncResult.originalMessage);1343-1344-expectAssignable<Options>({cleanup: false});1345-expectNotAssignable<SyncOptions>({cleanup: false});1346-expectAssignable<SyncOptions>({preferLocal: false});1347-1348-/* eslint-disable @typescript-eslint/no-floating-promises */1349-execa('unicorns', {preferLocal: false});1350-execaSync('unicorns', {preferLocal: false});1351-expectError(execa('unicorns', {preferLocal: 'false'}));1352-expectError(execaSync('unicorns', {preferLocal: 'false'}));1353-execa('unicorns', {localDir: '.'});1354-execaSync('unicorns', {localDir: '.'});1355-execa('unicorns', {localDir: fileUrl});1356-execaSync('unicorns', {localDir: fileUrl});1357-expectError(execa('unicorns', {localDir: false}));1358-expectError(execaSync('unicorns', {localDir: false}));1359-execa('unicorns', {node: true});1360-execaSync('unicorns', {node: true});1361-expectError(execa('unicorns', {node: 'true'}));1362-expectError(execaSync('unicorns', {node: 'true'}));1363-execa('unicorns', {nodePath: './node'});1364-execaSync('unicorns', {nodePath: './node'});1365-execa('unicorns', {nodePath: fileUrl});1366-execaSync('unicorns', {nodePath: fileUrl});1367-expectError(execa('unicorns', {nodePath: false}));1368-expectError(execaSync('unicorns', {nodePath: false}));1369-execa('unicorns', {nodeOptions: ['--async-stack-traces'] as const});1370-execaSync('unicorns', {nodeOptions: ['--async-stack-traces'] as const});1371-expectError(execa('unicorns', {nodeOptions: [false] as const}));1372-expectError(execaSync('unicorns', {nodeOptions: [false] as const}));1373-execa('unicorns', {input: ''});1374-execaSync('unicorns', {input: ''});1375-execa('unicorns', {input: new Uint8Array()});1376-execaSync('unicorns', {input: new Uint8Array()});1377-execa('unicorns', {input: process.stdin});1378-execaSync('unicorns', {input: process.stdin});1379-expectError(execa('unicorns', {input: false}));1380-expectError(execaSync('unicorns', {input: false}));1381-execa('unicorns', {inputFile: ''});1382-execaSync('unicorns', {inputFile: ''});1383-execa('unicorns', {inputFile: fileUrl});1384-execaSync('unicorns', {inputFile: fileUrl});1385-expectError(execa('unicorns', {inputFile: false}));1386-expectError(execaSync('unicorns', {inputFile: false}));1387-execa('unicorns', {lines: false});1388-execaSync('unicorns', {lines: false});1389-expectError(execa('unicorns', {lines: 'false'}));1390-expectError(execaSync('unicorns', {lines: 'false'}));1391-execa('unicorns', {reject: false});1392-execaSync('unicorns', {reject: false});1393-expectError(execa('unicorns', {reject: 'false'}));1394-expectError(execaSync('unicorns', {reject: 'false'}));1395-execa('unicorns', {stripFinalNewline: false});1396-execaSync('unicorns', {stripFinalNewline: false});1397-expectError(execa('unicorns', {stripFinalNewline: 'false'}));1398-expectError(execaSync('unicorns', {stripFinalNewline: 'false'}));1399-execa('unicorns', {extendEnv: false});1400-execaSync('unicorns', {extendEnv: false});1401-expectError(execa('unicorns', {extendEnv: 'false'}));1402-expectError(execaSync('unicorns', {extendEnv: 'false'}));1403-execa('unicorns', {cwd: '.'});1404-execaSync('unicorns', {cwd: '.'});1405-execa('unicorns', {cwd: fileUrl});1406-execaSync('unicorns', {cwd: fileUrl});1407-expectError(execa('unicorns', {cwd: false}));1408-expectError(execaSync('unicorns', {cwd: false}));1409-// eslint-disable-next-line @typescript-eslint/naming-convention1410-execa('unicorns', {env: {PATH: ''}});1411-// eslint-disable-next-line @typescript-eslint/naming-convention1412-execaSync('unicorns', {env: {PATH: ''}});1413-expectError(execa('unicorns', {env: false}));1414-expectError(execaSync('unicorns', {env: false}));1415-execa('unicorns', {argv0: ''});1416-execaSync('unicorns', {argv0: ''});1417-expectError(execa('unicorns', {argv0: false}));1418-expectError(execaSync('unicorns', {argv0: false}));1419-execa('unicorns', {uid: 0});1420-execaSync('unicorns', {uid: 0});1421-expectError(execa('unicorns', {uid: '0'}));1422-expectError(execaSync('unicorns', {uid: '0'}));1423-execa('unicorns', {gid: 0});1424-execaSync('unicorns', {gid: 0});1425-expectError(execa('unicorns', {gid: '0'}));1426-expectError(execaSync('unicorns', {gid: '0'}));1427-execa('unicorns', {shell: true});1428-execaSync('unicorns', {shell: true});1429-execa('unicorns', {shell: '/bin/sh'});1430-execaSync('unicorns', {shell: '/bin/sh'});1431-execa('unicorns', {shell: fileUrl});1432-execaSync('unicorns', {shell: fileUrl});1433-expectError(execa('unicorns', {shell: {}}));1434-expectError(execaSync('unicorns', {shell: {}}));1435-execa('unicorns', {timeout: 1000});1436-execaSync('unicorns', {timeout: 1000});1437-expectError(execa('unicorns', {timeout: '1000'}));1438-expectError(execaSync('unicorns', {timeout: '1000'}));1439-execa('unicorns', {maxBuffer: 1000});1440-execaSync('unicorns', {maxBuffer: 1000});1441-expectError(execa('unicorns', {maxBuffer: '1000'}));1442-expectError(execaSync('unicorns', {maxBuffer: '1000'}));1443-execa('unicorns', {killSignal: 'SIGTERM'});1444-execaSync('unicorns', {killSignal: 'SIGTERM'});1445-execa('unicorns', {killSignal: 9});1446-execaSync('unicorns', {killSignal: 9});1447-expectError(execa('unicorns', {killSignal: false}));1448-expectError(execaSync('unicorns', {killSignal: false}));1449-execa('unicorns', {forceKillAfterDelay: false});1450-expectError(execaSync('unicorns', {forceKillAfterDelay: false}));1451-execa('unicorns', {forceKillAfterDelay: 42});1452-expectError(execaSync('unicorns', {forceKillAfterDelay: 42}));1453-expectError(execa('unicorns', {forceKillAfterDelay: 'true'}));1454-expectError(execaSync('unicorns', {forceKillAfterDelay: 'true'}));1455-execa('unicorns', {windowsVerbatimArguments: true});1456-execaSync('unicorns', {windowsVerbatimArguments: true});1457-expectError(execa('unicorns', {windowsVerbatimArguments: 'true'}));1458-expectError(execaSync('unicorns', {windowsVerbatimArguments: 'true'}));1459-execa('unicorns', {windowsHide: false});1460-execaSync('unicorns', {windowsHide: false});1461-expectError(execa('unicorns', {windowsHide: 'false'}));1462-expectError(execaSync('unicorns', {windowsHide: 'false'}));1463-execa('unicorns', {verbose: 'none'});1464-execaSync('unicorns', {verbose: 'none'});1465-execa('unicorns', {verbose: 'short'});1466-execaSync('unicorns', {verbose: 'short'});1467-execa('unicorns', {verbose: 'full'});1468-execaSync('unicorns', {verbose: 'full'});1469-expectError(execa('unicorns', {verbose: 'other'}));1470-expectError(execaSync('unicorns', {verbose: 'other'}));1471-execa('unicorns', {cleanup: false});1472-expectError(execaSync('unicorns', {cleanup: false}));1473-expectError(execa('unicorns', {cleanup: 'false'}));1474-expectError(execaSync('unicorns', {cleanup: 'false'}));1475-execa('unicorns', {buffer: false});1476-execaSync('unicorns', {buffer: false});1477-expectError(execa('unicorns', {buffer: 'false'}));1478-expectError(execaSync('unicorns', {buffer: 'false'}));1479-execa('unicorns', {all: true});1480-execaSync('unicorns', {all: true});1481-expectError(execa('unicorns', {all: 'true'}));1482-expectError(execaSync('unicorns', {all: 'true'}));1483-execa('unicorns', {ipc: true});1484-expectError(execaSync('unicorns', {ipc: true}));1485-expectError(execa('unicorns', {ipc: 'true'}));1486-expectError(execaSync('unicorns', {ipc: 'true'}));1487-execa('unicorns', {serialization: 'json'});1488-expectError(execaSync('unicorns', {serialization: 'json'}));1489-execa('unicorns', {serialization: 'advanced'});1490-expectError(execaSync('unicorns', {serialization: 'advanced'}));1491-expectError(execa('unicorns', {serialization: 'other'}));1492-expectError(execaSync('unicorns', {serialization: 'other'}));1493-execa('unicorns', {detached: true});1494-expectError(execaSync('unicorns', {detached: true}));1495-expectError(execa('unicorns', {detached: 'true'}));1496-expectError(execaSync('unicorns', {detached: 'true'}));1497-execa('unicorns', {cancelSignal: new AbortController().signal});1498-expectError(execaSync('unicorns', {cancelSignal: new AbortController().signal}));1499-expectError(execa('unicorns', {cancelSignal: false}));1500-expectError(execaSync('unicorns', {cancelSignal: false}));1501-1502-execa('unicorns', {encoding: 'utf8'});1503-execaSync('unicorns', {encoding: 'utf8'});1504-/* eslint-disable unicorn/text-encoding-identifier-case */1505-expectError(execa('unicorns', {encoding: 'utf-8'}));1506-expectError(execaSync('unicorns', {encoding: 'utf-8'}));1507-expectError(execa('unicorns', {encoding: 'UTF8'}));1508-expectError(execaSync('unicorns', {encoding: 'UTF8'}));1509-/* eslint-enable unicorn/text-encoding-identifier-case */1510-execa('unicorns', {encoding: 'utf16le'});1511-execaSync('unicorns', {encoding: 'utf16le'});1512-expectError(execa('unicorns', {encoding: 'utf-16le'}));1513-expectError(execaSync('unicorns', {encoding: 'utf-16le'}));1514-expectError(execa('unicorns', {encoding: 'ucs2'}));1515-expectError(execaSync('unicorns', {encoding: 'ucs2'}));1516-expectError(execa('unicorns', {encoding: 'ucs-2'}));1517-expectError(execaSync('unicorns', {encoding: 'ucs-2'}));1518-execa('unicorns', {encoding: 'buffer'});1519-execaSync('unicorns', {encoding: 'buffer'});1520-expectError(execa('unicorns', {encoding: null}));1521-expectError(execaSync('unicorns', {encoding: null}));1522-execa('unicorns', {encoding: 'hex'});1523-execaSync('unicorns', {encoding: 'hex'});1524-execa('unicorns', {encoding: 'base64'});1525-execaSync('unicorns', {encoding: 'base64'});1526-execa('unicorns', {encoding: 'base64url'});1527-execaSync('unicorns', {encoding: 'base64url'});1528-execa('unicorns', {encoding: 'latin1'});1529-execaSync('unicorns', {encoding: 'latin1'});1530-expectError(execa('unicorns', {encoding: 'binary'}));1531-expectError(execaSync('unicorns', {encoding: 'binary'}));1532-execa('unicorns', {encoding: 'ascii'});1533-execaSync('unicorns', {encoding: 'ascii'});1534-expectError(execa('unicorns', {encoding: 'unknownEncoding'}));1535-expectError(execaSync('unicorns', {encoding: 'unknownEncoding'}));1536-1537-execa('unicorns', {maxBuffer: {}});1538-expectError(execa('unicorns', {maxBuffer: []}));1539-execa('unicorns', {maxBuffer: {stdout: 0}});1540-execa('unicorns', {maxBuffer: {stderr: 0}});1541-execa('unicorns', {maxBuffer: {stdout: 0, stderr: 0} as const});1542-execa('unicorns', {maxBuffer: {all: 0}});1543-execa('unicorns', {maxBuffer: {fd1: 0}});1544-execa('unicorns', {maxBuffer: {fd2: 0}});1545-execa('unicorns', {maxBuffer: {fd3: 0}});1546-expectError(execa('unicorns', {maxBuffer: {stdout: '0'}}));1547-execaSync('unicorns', {maxBuffer: {}});1548-expectError(execaSync('unicorns', {maxBuffer: []}));1549-execaSync('unicorns', {maxBuffer: {stdout: 0}});1550-execaSync('unicorns', {maxBuffer: {stderr: 0}});1551-execaSync('unicorns', {maxBuffer: {stdout: 0, stderr: 0} as const});1552-execaSync('unicorns', {maxBuffer: {all: 0}});1553-execaSync('unicorns', {maxBuffer: {fd1: 0}});1554-execaSync('unicorns', {maxBuffer: {fd2: 0}});1555-execaSync('unicorns', {maxBuffer: {fd3: 0}});1556-expectError(execaSync('unicorns', {maxBuffer: {stdout: '0'}}));1557-execa('unicorns', {verbose: {}});1558-expectError(execa('unicorns', {verbose: []}));1559-execa('unicorns', {verbose: {stdout: 'none'}});1560-execa('unicorns', {verbose: {stderr: 'none'}});1561-execa('unicorns', {verbose: {stdout: 'none', stderr: 'none'} as const});1562-execa('unicorns', {verbose: {all: 'none'}});1563-execa('unicorns', {verbose: {fd1: 'none'}});1564-execa('unicorns', {verbose: {fd2: 'none'}});1565-execa('unicorns', {verbose: {fd3: 'none'}});1566-expectError(execa('unicorns', {verbose: {stdout: 'other'}}));1567-execaSync('unicorns', {verbose: {}});1568-expectError(execaSync('unicorns', {verbose: []}));1569-execaSync('unicorns', {verbose: {stdout: 'none'}});1570-execaSync('unicorns', {verbose: {stderr: 'none'}});1571-execaSync('unicorns', {verbose: {stdout: 'none', stderr: 'none'} as const});1572-execaSync('unicorns', {verbose: {all: 'none'}});1573-execaSync('unicorns', {verbose: {fd1: 'none'}});1574-execaSync('unicorns', {verbose: {fd2: 'none'}});1575-execaSync('unicorns', {verbose: {fd3: 'none'}});1576-expectError(execaSync('unicorns', {verbose: {stdout: 'other'}}));1577-execa('unicorns', {stripFinalNewline: {}});1578-expectError(execa('unicorns', {stripFinalNewline: []}));1579-execa('unicorns', {stripFinalNewline: {stdout: true}});1580-execa('unicorns', {stripFinalNewline: {stderr: true}});1581-execa('unicorns', {stripFinalNewline: {stdout: true, stderr: true} as const});1582-execa('unicorns', {stripFinalNewline: {all: true}});1583-execa('unicorns', {stripFinalNewline: {fd1: true}});1584-execa('unicorns', {stripFinalNewline: {fd2: true}});1585-execa('unicorns', {stripFinalNewline: {fd3: true}});1586-expectError(execa('unicorns', {stripFinalNewline: {stdout: 'true'}}));1587-execaSync('unicorns', {stripFinalNewline: {}});1588-expectError(execaSync('unicorns', {stripFinalNewline: []}));1589-execaSync('unicorns', {stripFinalNewline: {stdout: true}});1590-execaSync('unicorns', {stripFinalNewline: {stderr: true}});1591-execaSync('unicorns', {stripFinalNewline: {stdout: true, stderr: true} as const});1592-execaSync('unicorns', {stripFinalNewline: {all: true}});1593-execaSync('unicorns', {stripFinalNewline: {fd1: true}});1594-execaSync('unicorns', {stripFinalNewline: {fd2: true}});1595-execaSync('unicorns', {stripFinalNewline: {fd3: true}});1596-expectError(execaSync('unicorns', {stripFinalNewline: {stdout: 'true'}}));1597-execa('unicorns', {lines: {}});1598-expectError(execa('unicorns', {lines: []}));1599-execa('unicorns', {lines: {stdout: true}});1600-execa('unicorns', {lines: {stderr: true}});1601-execa('unicorns', {lines: {stdout: true, stderr: true} as const});1602-execa('unicorns', {lines: {all: true}});1603-execa('unicorns', {lines: {fd1: true}});1604-execa('unicorns', {lines: {fd2: true}});1605-execa('unicorns', {lines: {fd3: true}});1606-expectError(execa('unicorns', {lines: {stdout: 'true'}}));1607-execaSync('unicorns', {lines: {}});1608-expectError(execaSync('unicorns', {lines: []}));1609-execaSync('unicorns', {lines: {stdout: true}});1610-execaSync('unicorns', {lines: {stderr: true}});1611-execaSync('unicorns', {lines: {stdout: true, stderr: true} as const});1612-execaSync('unicorns', {lines: {all: true}});1613-execaSync('unicorns', {lines: {fd1: true}});1614-execaSync('unicorns', {lines: {fd2: true}});1615-execaSync('unicorns', {lines: {fd3: true}});1616-expectError(execaSync('unicorns', {lines: {stdout: 'true'}}));1617-execa('unicorns', {buffer: {}});1618-expectError(execa('unicorns', {buffer: []}));1619-execa('unicorns', {buffer: {stdout: true}});1620-execa('unicorns', {buffer: {stderr: true}});1621-execa('unicorns', {buffer: {stdout: true, stderr: true} as const});1622-execa('unicorns', {buffer: {all: true}});1623-execa('unicorns', {buffer: {fd1: true}});1624-execa('unicorns', {buffer: {fd2: true}});1625-execa('unicorns', {buffer: {fd3: true}});1626-expectError(execa('unicorns', {buffer: {stdout: 'true'}}));1627-execaSync('unicorns', {buffer: {}});1628-expectError(execaSync('unicorns', {buffer: []}));1629-execaSync('unicorns', {buffer: {stdout: true}});1630-execaSync('unicorns', {buffer: {stderr: true}});1631-execaSync('unicorns', {buffer: {stdout: true, stderr: true} as const});1632-execaSync('unicorns', {buffer: {all: true}});1633-execaSync('unicorns', {buffer: {fd1: true}});1634-execaSync('unicorns', {buffer: {fd2: true}});1635-execaSync('unicorns', {buffer: {fd3: true}});1636-expectError(execaSync('unicorns', {buffer: {stdout: 'true'}}));1637-1638-expectType<string[]>(execaSync('unicorns', {lines: {stdout: true, fd1: false}}).stdout);1639-expectType<string[]>(execaSync('unicorns', {lines: {stdout: true, all: false}}).stdout);1640-expectType<string[]>(execaSync('unicorns', {lines: {fd1: true, all: false}}).stdout);1641-expectType<string[]>(execaSync('unicorns', {lines: {stderr: true, fd2: false}}).stderr);1642-expectType<string[]>(execaSync('unicorns', {lines: {stderr: true, all: false}}).stderr);1643-expectType<string[]>(execaSync('unicorns', {lines: {fd2: true, all: false}}).stderr);1644-expectType<string[]>(execaSync('unicorns', {lines: {fd1: false, stdout: true}}).stdout);1645-expectType<string[]>(execaSync('unicorns', {lines: {all: false, stdout: true}}).stdout);1646-expectType<string[]>(execaSync('unicorns', {lines: {all: false, fd1: true}}).stdout);1647-expectType<string[]>(execaSync('unicorns', {lines: {fd2: false, stderr: true}}).stderr);1648-expectType<string[]>(execaSync('unicorns', {lines: {all: false, stderr: true}}).stderr);1649-expectType<string[]>(execaSync('unicorns', {lines: {all: false, fd2: true}}).stderr);1650-1651-const linesStdoutResult = await execa('unicorns', {all: true, lines: {stdout: true}});1652-expectType<string[]>(linesStdoutResult.stdout);1653-expectType<string[]>(linesStdoutResult.stdio[1]);1654-expectType<string>(linesStdoutResult.stderr);1655-expectType<string>(linesStdoutResult.stdio[2]);1656-expectType<string[]>(linesStdoutResult.all);1657-1658-const linesStderrResult = await execa('unicorns', {all: true, lines: {stderr: true}});1659-expectType<string>(linesStderrResult.stdout);1660-expectType<string>(linesStderrResult.stdio[1]);1661-expectType<string[]>(linesStderrResult.stderr);1662-expectType<string[]>(linesStderrResult.stdio[2]);1663-expectType<string[]>(linesStderrResult.all);1664-1665-const linesFd1Result = await execa('unicorns', {all: true, lines: {fd1: true}});1666-expectType<string[]>(linesFd1Result.stdout);1667-expectType<string[]>(linesFd1Result.stdio[1]);1668-expectType<string>(linesFd1Result.stderr);1669-expectType<string>(linesFd1Result.stdio[2]);1670-expectType<string[]>(linesFd1Result.all);1671-1672-const linesFd2Result = await execa('unicorns', {all: true, lines: {fd2: true}});1673-expectType<string>(linesFd2Result.stdout);1674-expectType<string>(linesFd2Result.stdio[1]);1675-expectType<string[]>(linesFd2Result.stderr);1676-expectType<string[]>(linesFd2Result.stdio[2]);1677-expectType<string[]>(linesFd2Result.all);1678-1679-const linesAllResult = await execa('unicorns', {all: true, lines: {all: true}});1680-expectType<string[]>(linesAllResult.stdout);1681-expectType<string[]>(linesAllResult.stdio[1]);1682-expectType<string[]>(linesAllResult.stderr);1683-expectType<string[]>(linesAllResult.stdio[2]);1684-expectType<string[]>(linesAllResult.all);1685-1686-const linesFd3Result = await execa('unicorns', {all: true, lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});1687-expectType<string>(linesFd3Result.stdout);1688-expectType<string>(linesFd3Result.stdio[1]);1689-expectType<string>(linesFd3Result.stderr);1690-expectType<string>(linesFd3Result.stdio[2]);1691-expectType<string>(linesFd3Result.all);1692-expectType<string[]>(linesFd3Result.stdio[3]);1693-expectType<string>(linesFd3Result.stdio[4]);1694-1695-const linesStdoutResultSync = execaSync('unicorns', {all: true, lines: {stdout: true}});1696-expectType<string[]>(linesStdoutResultSync.stdout);1697-expectType<string[]>(linesStdoutResultSync.stdio[1]);1698-expectType<string>(linesStdoutResultSync.stderr);1699-expectType<string>(linesStdoutResultSync.stdio[2]);1700-expectType<string[]>(linesStdoutResultSync.all);1701-1702-const linesStderrResultSync = execaSync('unicorns', {all: true, lines: {stderr: true}});1703-expectType<string>(linesStderrResultSync.stdout);1704-expectType<string>(linesStderrResultSync.stdio[1]);1705-expectType<string[]>(linesStderrResultSync.stderr);1706-expectType<string[]>(linesStderrResultSync.stdio[2]);1707-expectType<string[]>(linesStderrResultSync.all);1708-1709-const linesFd1ResultSync = execaSync('unicorns', {all: true, lines: {fd1: true}});1710-expectType<string[]>(linesFd1ResultSync.stdout);1711-expectType<string[]>(linesFd1ResultSync.stdio[1]);1712-expectType<string>(linesFd1ResultSync.stderr);1713-expectType<string>(linesFd1ResultSync.stdio[2]);1714-expectType<string[]>(linesFd1ResultSync.all);1715-1716-const linesFd2ResultSync = execaSync('unicorns', {all: true, lines: {fd2: true}});1717-expectType<string>(linesFd2ResultSync.stdout);1718-expectType<string>(linesFd2ResultSync.stdio[1]);1719-expectType<string[]>(linesFd2ResultSync.stderr);1720-expectType<string[]>(linesFd2ResultSync.stdio[2]);1721-expectType<string[]>(linesFd2ResultSync.all);1722-1723-const linesAllResultSync = execaSync('unicorns', {all: true, lines: {all: true}});1724-expectType<string[]>(linesAllResultSync.stdout);1725-expectType<string[]>(linesAllResultSync.stdio[1]);1726-expectType<string[]>(linesAllResultSync.stderr);1727-expectType<string[]>(linesAllResultSync.stdio[2]);1728-expectType<string[]>(linesAllResultSync.all);1729-1730-const linesFd3ResultSync = execaSync('unicorns', {all: true, lines: {fd3: true}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});1731-expectType<string>(linesFd3ResultSync.stdout);1732-expectType<string>(linesFd3ResultSync.stdio[1]);1733-expectType<string>(linesFd3ResultSync.stderr);1734-expectType<string>(linesFd3ResultSync.stdio[2]);1735-expectType<string>(linesFd3ResultSync.all);1736-expectType<string[]>(linesFd3ResultSync.stdio[3]);1737-expectType<string>(linesFd3ResultSync.stdio[4]);1738-1739-const noBufferStdoutResult = await execa('unicorns', {all: true, buffer: {stdout: false}});1740-expectType<undefined>(noBufferStdoutResult.stdout);1741-expectType<undefined>(noBufferStdoutResult.stdio[1]);1742-expectType<string>(noBufferStdoutResult.stderr);1743-expectType<string>(noBufferStdoutResult.stdio[2]);1744-expectType<string>(noBufferStdoutResult.all);1745-1746-const noBufferStderrResult = await execa('unicorns', {all: true, buffer: {stderr: false}});1747-expectType<string>(noBufferStderrResult.stdout);1748-expectType<string>(noBufferStderrResult.stdio[1]);1749-expectType<undefined>(noBufferStderrResult.stderr);1750-expectType<undefined>(noBufferStderrResult.stdio[2]);1751-expectType<string>(noBufferStderrResult.all);1752-1753-const noBufferFd1Result = await execa('unicorns', {all: true, buffer: {fd1: false}});1754-expectType<undefined>(noBufferFd1Result.stdout);1755-expectType<undefined>(noBufferFd1Result.stdio[1]);1756-expectType<string>(noBufferFd1Result.stderr);1757-expectType<string>(noBufferFd1Result.stdio[2]);1758-expectType<string>(noBufferFd1Result.all);1759-1760-const noBufferFd2Result = await execa('unicorns', {all: true, buffer: {fd2: false}});1761-expectType<string>(noBufferFd2Result.stdout);1762-expectType<string>(noBufferFd2Result.stdio[1]);1763-expectType<undefined>(noBufferFd2Result.stderr);1764-expectType<undefined>(noBufferFd2Result.stdio[2]);1765-expectType<string>(noBufferFd2Result.all);1766-1767-const noBufferAllResult = await execa('unicorns', {all: true, buffer: {all: false}});1768-expectType<undefined>(noBufferAllResult.stdout);1769-expectType<undefined>(noBufferAllResult.stdio[1]);1770-expectType<undefined>(noBufferAllResult.stderr);1771-expectType<undefined>(noBufferAllResult.stdio[2]);1772-expectType<undefined>(noBufferAllResult.all);1773-1774-const noBufferFd3Result = await execa('unicorns', {all: true, buffer: {fd3: false}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});1775-expectType<string>(noBufferFd3Result.stdout);1776-expectType<string>(noBufferFd3Result.stdio[1]);1777-expectType<string>(noBufferFd3Result.stderr);1778-expectType<string>(noBufferFd3Result.stdio[2]);1779-expectType<string>(noBufferFd3Result.all);1780-expectType<undefined>(noBufferFd3Result.stdio[3]);1781-expectType<string>(noBufferFd3Result.stdio[4]);1782-1783-const noBufferStdoutResultSync = execaSync('unicorns', {all: true, buffer: {stdout: false}});1784-expectType<undefined>(noBufferStdoutResultSync.stdout);1785-expectType<undefined>(noBufferStdoutResultSync.stdio[1]);1786-expectType<string>(noBufferStdoutResultSync.stderr);1787-expectType<string>(noBufferStdoutResultSync.stdio[2]);1788-expectType<string>(noBufferStdoutResultSync.all);1789-1790-const noBufferStderrResultSync = execaSync('unicorns', {all: true, buffer: {stderr: false}});1791-expectType<string>(noBufferStderrResultSync.stdout);1792-expectType<string>(noBufferStderrResultSync.stdio[1]);1793-expectType<undefined>(noBufferStderrResultSync.stderr);1794-expectType<undefined>(noBufferStderrResultSync.stdio[2]);1795-expectType<string>(noBufferStderrResultSync.all);1796-1797-const noBufferFd1ResultSync = execaSync('unicorns', {all: true, buffer: {fd1: false}});1798-expectType<undefined>(noBufferFd1ResultSync.stdout);1799-expectType<undefined>(noBufferFd1ResultSync.stdio[1]);1800-expectType<string>(noBufferFd1ResultSync.stderr);1801-expectType<string>(noBufferFd1ResultSync.stdio[2]);1802-expectType<string>(noBufferFd1ResultSync.all);1803-1804-const noBufferFd2ResultSync = execaSync('unicorns', {all: true, buffer: {fd2: false}});1805-expectType<string>(noBufferFd2ResultSync.stdout);1806-expectType<string>(noBufferFd2ResultSync.stdio[1]);1807-expectType<undefined>(noBufferFd2ResultSync.stderr);1808-expectType<undefined>(noBufferFd2ResultSync.stdio[2]);1809-expectType<string>(noBufferFd2ResultSync.all);1810-1811-const noBufferAllResultSync = execaSync('unicorns', {all: true, buffer: {all: false}});1812-expectType<undefined>(noBufferAllResultSync.stdout);1813-expectType<undefined>(noBufferAllResultSync.stdio[1]);1814-expectType<undefined>(noBufferAllResultSync.stderr);1815-expectType<undefined>(noBufferAllResultSync.stdio[2]);1816-expectType<undefined>(noBufferAllResultSync.all);1817-1818-const noBufferFd3ResultSync = execaSync('unicorns', {all: true, buffer: {fd3: false}, stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe']});1819-expectType<string>(noBufferFd3ResultSync.stdout);1820-expectType<string>(noBufferFd3ResultSync.stdio[1]);1821-expectType<string>(noBufferFd3ResultSync.stderr);1822-expectType<string>(noBufferFd3ResultSync.stdio[2]);1823-expectType<string>(noBufferFd3ResultSync.all);1824-expectType<undefined>(noBufferFd3ResultSync.stdio[3]);1825-expectType<string>(noBufferFd3ResultSync.stdio[4]);1826-1827-expectError(execa('unicorns', {stdio: []}));1828-expectError(execaSync('unicorns', {stdio: []}));1829-expectError(execa('unicorns', {stdio: ['pipe']}));1830-expectError(execaSync('unicorns', {stdio: ['pipe']}));1831-expectError(execa('unicorns', {stdio: ['pipe', 'pipe']}));1832-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe']}));1833-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'pipe']});1834-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'pipe']});1835-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'unknown']}));1836-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe', 'unknown']}));1837-execa('unicorns', {stdio: [new Readable(), 'pipe', 'pipe']});1838-execaSync('unicorns', {stdio: [new Readable(), 'pipe', 'pipe']});1839-execa('unicorns', {stdio: [[new Readable()], ['pipe'], ['pipe']]});1840-expectError(execaSync('unicorns', {stdio: [[new Readable()], ['pipe'], ['pipe']]}));1841-execa('unicorns', {stdio: ['pipe', new Writable(), 'pipe']});1842-execaSync('unicorns', {stdio: ['pipe', new Writable(), 'pipe']});1843-execa('unicorns', {stdio: [['pipe'], [new Writable()], ['pipe']]});1844-expectError(execaSync('unicorns', {stdio: [['pipe'], [new Writable()], ['pipe']]}));1845-execa('unicorns', {stdio: ['pipe', 'pipe', new Writable()]});1846-execaSync('unicorns', {stdio: ['pipe', 'pipe', new Writable()]});1847-execa('unicorns', {stdio: [['pipe'], ['pipe'], [new Writable()]]});1848-expectError(execaSync('unicorns', {stdio: [['pipe'], ['pipe'], [new Writable()]]}));1849-expectError(execa('unicorns', {stdio: [new Writable(), 'pipe', 'pipe']}));1850-expectError(execaSync('unicorns', {stdio: [new Writable(), 'pipe', 'pipe']}));1851-expectError(execa('unicorns', {stdio: [[new Writable()], ['pipe'], ['pipe']]}));1852-expectError(execaSync('unicorns', {stdio: [[new Writable()], ['pipe'], ['pipe']]}));1853-expectError(execa('unicorns', {stdio: ['pipe', new Readable(), 'pipe']}));1854-expectError(execaSync('unicorns', {stdio: ['pipe', new Readable(), 'pipe']}));1855-expectError(execa('unicorns', {stdio: [['pipe'], [new Readable()], ['pipe']]}));1856-expectError(execaSync('unicorns', {stdio: [['pipe'], [new Readable()], ['pipe']]}));1857-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', new Readable()]}));1858-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', new Readable()]}));1859-expectError(execa('unicorns', {stdio: [['pipe'], ['pipe'], [new Readable()]]}));1860-expectError(execaSync('unicorns', {stdio: [['pipe'], ['pipe'], [new Readable()]]}));1861-expectAssignable<StdioOption>([new Uint8Array(), new Uint8Array()]);1862-expectAssignable<StdioOptionSync>([new Uint8Array(), new Uint8Array()]);1863-expectNotAssignable<StdioOption>([new Writable(), new Uint8Array()]);1864-expectNotAssignable<StdioOptionSync>([new Writable(), new Uint8Array()]);1865-1866-expectError(execa('unicorns', {stdin: 'unknown'}));1867-expectError(execaSync('unicorns', {stdin: 'unknown'}));1868-expectError(execa('unicorns', {stdin: ['unknown']}));1869-expectError(execaSync('unicorns', {stdin: ['unknown']}));1870-expectError(execa('unicorns', {stdout: 'unknown'}));1871-expectError(execaSync('unicorns', {stdout: 'unknown'}));1872-expectError(execa('unicorns', {stdout: ['unknown']}));1873-expectError(execaSync('unicorns', {stdout: ['unknown']}));1874-expectError(execa('unicorns', {stderr: 'unknown'}));1875-expectError(execaSync('unicorns', {stderr: 'unknown'}));1876-expectError(execa('unicorns', {stderr: ['unknown']}));1877-expectError(execaSync('unicorns', {stderr: ['unknown']}));1878-expectError(execa('unicorns', {stdio: 'unknown'}));1879-expectError(execaSync('unicorns', {stdio: 'unknown'}));1880-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'unknown']}));1881-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'unknown']}));1882-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['unknown']]}));1883-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['unknown']]}));1884-expectNotAssignable<StdinOption>('unknown');1885-expectNotAssignable<StdinOptionSync>('unknown');1886-expectNotAssignable<StdinOption>(['unknown']);1887-expectNotAssignable<StdinOptionSync>(['unknown']);1888-expectNotAssignable<StdoutStderrOption>('unknown');1889-expectNotAssignable<StdoutStderrOptionSync>('unknown');1890-expectNotAssignable<StdoutStderrOption>(['unknown']);1891-expectNotAssignable<StdoutStderrOptionSync>(['unknown']);1892-expectNotAssignable<StdioOption>('unknown');1893-expectNotAssignable<StdioOptionSync>('unknown');1894-expectNotAssignable<StdioOption>(['unknown']);1895-expectNotAssignable<StdioOptionSync>(['unknown']);1896-execa('unicorns', {stdin: pipeInherit});1897-execaSync('unicorns', {stdin: pipeInherit});1898-execa('unicorns', {stdout: pipeInherit});1899-execaSync('unicorns', {stdout: pipeInherit});1900-execa('unicorns', {stderr: pipeInherit});1901-execaSync('unicorns', {stderr: pipeInherit});1902-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeInherit]}));1903-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeInherit]});1904-expectAssignable<StdinOption>(pipeInherit);1905-expectAssignable<StdinOptionSync>(pipeInherit);1906-expectAssignable<StdoutStderrOption>(pipeInherit);1907-expectAssignable<StdoutStderrOptionSync>(pipeInherit);1908-expectAssignable<StdioOption>(pipeInherit);1909-expectAssignable<StdioOptionSync>(pipeInherit);1910-execa('unicorns', {stdin: pipeUndefined});1911-execaSync('unicorns', {stdin: pipeUndefined});1912-execa('unicorns', {stdout: pipeUndefined});1913-execaSync('unicorns', {stdout: pipeUndefined});1914-execa('unicorns', {stderr: pipeUndefined});1915-execaSync('unicorns', {stderr: pipeUndefined});1916-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeUndefined]});1917-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', pipeUndefined]});1918-expectAssignable<StdinOption>(pipeUndefined);1919-expectAssignable<StdinOptionSync>(pipeUndefined);1920-expectAssignable<StdoutStderrOption>(pipeUndefined);1921-expectAssignable<StdoutStderrOptionSync>(pipeUndefined);1922-expectAssignable<StdioOption>(pipeUndefined);1923-expectAssignable<StdioOptionSync>(pipeUndefined);1924-execa('unicorns', {stdin: 'pipe'});1925-execaSync('unicorns', {stdin: 'pipe'});1926-execa('unicorns', {stdin: ['pipe']});1927-execaSync('unicorns', {stdin: ['pipe']});1928-execa('unicorns', {stdout: 'pipe'});1929-execaSync('unicorns', {stdout: 'pipe'});1930-execa('unicorns', {stdout: ['pipe']});1931-execaSync('unicorns', {stdout: ['pipe']});1932-execa('unicorns', {stderr: 'pipe'});1933-execaSync('unicorns', {stderr: 'pipe'});1934-execa('unicorns', {stderr: ['pipe']});1935-execaSync('unicorns', {stderr: ['pipe']});1936-execa('unicorns', {stdio: 'pipe'});1937-execaSync('unicorns', {stdio: 'pipe'});1938-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});1939-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'pipe']});1940-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe']]});1941-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['pipe']]});1942-expectAssignable<StdinOption>('pipe');1943-expectAssignable<StdinOptionSync>('pipe');1944-expectAssignable<StdinOption>(['pipe']);1945-expectAssignable<StdinOptionSync>(['pipe']);1946-expectAssignable<StdoutStderrOption>('pipe');1947-expectAssignable<StdoutStderrOptionSync>('pipe');1948-expectAssignable<StdoutStderrOption>(['pipe']);1949-expectAssignable<StdoutStderrOptionSync>(['pipe']);1950-expectAssignable<StdioOption>('pipe');1951-expectAssignable<StdioOptionSync>('pipe');1952-expectAssignable<StdioOption>(['pipe']);1953-expectAssignable<StdioOptionSync>(['pipe']);1954-execa('unicorns', {stdin: undefined});1955-execaSync('unicorns', {stdin: undefined});1956-execa('unicorns', {stdin: [undefined]});1957-execaSync('unicorns', {stdin: [undefined]});1958-execa('unicorns', {stdout: undefined});1959-execaSync('unicorns', {stdout: undefined});1960-execa('unicorns', {stdout: [undefined]});1961-execaSync('unicorns', {stdout: [undefined]});1962-execa('unicorns', {stderr: undefined});1963-execaSync('unicorns', {stderr: undefined});1964-execa('unicorns', {stderr: [undefined]});1965-execaSync('unicorns', {stderr: [undefined]});1966-execa('unicorns', {stdio: undefined});1967-execaSync('unicorns', {stdio: undefined});1968-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});1969-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', undefined]});1970-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined]]});1971-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [undefined]]});1972-expectAssignable<StdinOption>(undefined);1973-expectAssignable<StdinOptionSync>(undefined);1974-expectAssignable<StdinOption>([undefined]);1975-expectAssignable<StdinOptionSync>([undefined]);1976-expectAssignable<StdoutStderrOption>(undefined);1977-expectAssignable<StdoutStderrOptionSync>(undefined);1978-expectAssignable<StdoutStderrOption>([undefined]);1979-expectAssignable<StdoutStderrOptionSync>([undefined]);1980-expectAssignable<StdioOption>(undefined);1981-expectAssignable<StdioOptionSync>(undefined);1982-expectAssignable<StdioOption>([undefined]);1983-expectAssignable<StdioOptionSync>([undefined]);1984-expectError(execa('unicorns', {stdin: null}));1985-expectError(execaSync('unicorns', {stdin: null}));1986-expectError(execa('unicorns', {stdin: [null]}));1987-expectError(execaSync('unicorns', {stdin: [null]}));1988-expectError(execa('unicorns', {stdout: null}));1989-expectError(execaSync('unicorns', {stdout: null}));1990-expectError(execa('unicorns', {stdout: [null]}));1991-expectError(execaSync('unicorns', {stdout: [null]}));1992-expectError(execa('unicorns', {stderr: null}));1993-expectError(execaSync('unicorns', {stderr: null}));1994-expectError(execa('unicorns', {stderr: [null]}));1995-expectError(execaSync('unicorns', {stderr: [null]}));1996-expectError(execa('unicorns', {stdio: null}));1997-expectError(execaSync('unicorns', {stdio: null}));1998-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', null]}));1999-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', null]}));2000-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [null]]}));2001-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [null]]}));2002-expectNotAssignable<StdinOption>(null);2003-expectNotAssignable<StdinOptionSync>(null);2004-expectNotAssignable<StdinOption>([null]);2005-expectNotAssignable<StdinOptionSync>([null]);2006-expectNotAssignable<StdoutStderrOption>(null);2007-expectNotAssignable<StdoutStderrOptionSync>(null);2008-expectNotAssignable<StdoutStderrOption>([null]);2009-expectNotAssignable<StdoutStderrOptionSync>([null]);2010-expectNotAssignable<StdioOption>(null);2011-expectNotAssignable<StdioOptionSync>(null);2012-expectNotAssignable<StdioOption>([null]);2013-expectNotAssignable<StdioOptionSync>([null]);2014-execa('unicorns', {stdin: 'inherit'});2015-execaSync('unicorns', {stdin: 'inherit'});2016-execa('unicorns', {stdin: ['inherit']});2017-execaSync('unicorns', {stdin: ['inherit']});2018-execa('unicorns', {stdout: 'inherit'});2019-execaSync('unicorns', {stdout: 'inherit'});2020-execa('unicorns', {stdout: ['inherit']});2021-execaSync('unicorns', {stdout: ['inherit']});2022-execa('unicorns', {stderr: 'inherit'});2023-execaSync('unicorns', {stderr: 'inherit'});2024-execa('unicorns', {stderr: ['inherit']});2025-execaSync('unicorns', {stderr: ['inherit']});2026-execa('unicorns', {stdio: 'inherit'});2027-execaSync('unicorns', {stdio: 'inherit'});2028-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'inherit']});2029-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'inherit']});2030-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['inherit']]}));2031-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['inherit']]});2032-expectAssignable<StdinOption>('inherit');2033-expectAssignable<StdinOptionSync>('inherit');2034-expectAssignable<StdinOption>(['inherit']);2035-expectAssignable<StdinOptionSync>(['inherit']);2036-expectAssignable<StdoutStderrOption>('inherit');2037-expectAssignable<StdoutStderrOptionSync>('inherit');2038-expectAssignable<StdoutStderrOption>(['inherit']);2039-expectAssignable<StdoutStderrOptionSync>(['inherit']);2040-expectAssignable<StdioOption>('inherit');2041-expectAssignable<StdioOptionSync>('inherit');2042-expectAssignable<StdioOption>(['inherit']);2043-expectAssignable<StdioOptionSync>(['inherit']);2044-execa('unicorns', {stdin: 'ignore'});2045-execaSync('unicorns', {stdin: 'ignore'});2046-expectError(execa('unicorns', {stdin: ['ignore']}));2047-expectError(execaSync('unicorns', {stdin: ['ignore']}));2048-execa('unicorns', {stdout: 'ignore'});2049-execaSync('unicorns', {stdout: 'ignore'});2050-expectError(execa('unicorns', {stdout: ['ignore']}));2051-expectError(execaSync('unicorns', {stdout: ['ignore']}));2052-execa('unicorns', {stderr: 'ignore'});2053-execaSync('unicorns', {stderr: 'ignore'});2054-expectError(execa('unicorns', {stderr: ['ignore']}));2055-expectError(execaSync('unicorns', {stderr: ['ignore']}));2056-execa('unicorns', {stdio: 'ignore'});2057-execaSync('unicorns', {stdio: 'ignore'});2058-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});2059-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ignore']});2060-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ignore']]}));2061-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ignore']]}));2062-expectAssignable<StdinOption>('ignore');2063-expectAssignable<StdinOptionSync>('ignore');2064-expectNotAssignable<StdinOption>(['ignore']);2065-expectNotAssignable<StdinOptionSync>(['ignore']);2066-expectAssignable<StdoutStderrOption>('ignore');2067-expectAssignable<StdoutStderrOptionSync>('ignore');2068-expectNotAssignable<StdoutStderrOption>(['ignore']);2069-expectNotAssignable<StdoutStderrOptionSync>(['ignore']);2070-expectAssignable<StdioOption>('ignore');2071-expectAssignable<StdioOptionSync>('ignore');2072-expectNotAssignable<StdioOption>(['ignore']);2073-expectNotAssignable<StdioOptionSync>(['ignore']);2074-execa('unicorns', {stdin: 'overlapped'});2075-expectError(execaSync('unicorns', {stdin: 'overlapped'}));2076-execa('unicorns', {stdin: ['overlapped']});2077-expectError(execaSync('unicorns', {stdin: ['overlapped']}));2078-execa('unicorns', {stdout: 'overlapped'});2079-expectError(execaSync('unicorns', {stdout: 'overlapped'}));2080-execa('unicorns', {stdout: ['overlapped']});2081-expectError(execaSync('unicorns', {stdout: ['overlapped']}));2082-execa('unicorns', {stderr: 'overlapped'});2083-expectError(execaSync('unicorns', {stderr: 'overlapped'}));2084-execa('unicorns', {stderr: ['overlapped']});2085-expectError(execaSync('unicorns', {stderr: ['overlapped']}));2086-execa('unicorns', {stdio: 'overlapped'});2087-expectError(execaSync('unicorns', {stdio: 'overlapped'}));2088-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'overlapped']});2089-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'overlapped']}));2090-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['overlapped']]});2091-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['overlapped']]}));2092-expectAssignable<StdinOption>('overlapped');2093-expectNotAssignable<StdinOptionSync>('overlapped');2094-expectAssignable<StdinOption>(['overlapped']);2095-expectNotAssignable<StdinOptionSync>(['overlapped']);2096-expectAssignable<StdoutStderrOption>('overlapped');2097-expectNotAssignable<StdoutStderrOptionSync>('overlapped');2098-expectAssignable<StdoutStderrOption>(['overlapped']);2099-expectNotAssignable<StdoutStderrOptionSync>(['overlapped']);2100-expectAssignable<StdioOption>('overlapped');2101-expectNotAssignable<StdioOptionSync>('overlapped');2102-expectAssignable<StdioOption>(['overlapped']);2103-expectNotAssignable<StdioOptionSync>(['overlapped']);2104-execa('unicorns', {stdin: 'ipc'});2105-expectError(execaSync('unicorns', {stdin: 'ipc'}));2106-expectError(execa('unicorns', {stdin: ['ipc']}));2107-expectError(execaSync('unicorns', {stdin: ['ipc']}));2108-execa('unicorns', {stdout: 'ipc'});2109-expectError(execaSync('unicorns', {stdout: 'ipc'}));2110-expectError(execa('unicorns', {stdout: ['ipc']}));2111-expectError(execaSync('unicorns', {stdout: ['ipc']}));2112-execa('unicorns', {stderr: 'ipc'});2113-expectError(execaSync('unicorns', {stderr: 'ipc'}));2114-expectError(execa('unicorns', {stderr: ['ipc']}));2115-expectError(execaSync('unicorns', {stderr: ['ipc']}));2116-expectError(execa('unicorns', {stdio: 'ipc'}));2117-expectError(execaSync('unicorns', {stdio: 'ipc'}));2118-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']});2119-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']}));2120-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ipc']]}));2121-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', ['ipc']]}));2122-expectAssignable<StdinOption>('ipc');2123-expectNotAssignable<StdinOptionSync>('ipc');2124-expectNotAssignable<StdinOption>(['ipc']);2125-expectNotAssignable<StdinOptionSync>(['ipc']);2126-expectAssignable<StdoutStderrOption>('ipc');2127-expectNotAssignable<StdoutStderrOptionSync>('ipc');2128-expectNotAssignable<StdoutStderrOption>(['ipc']);2129-expectNotAssignable<StdoutStderrOptionSync>(['ipc']);2130-expectAssignable<StdioOption>('ipc');2131-expectNotAssignable<StdioOptionSync>('ipc');2132-expectNotAssignable<StdioOption>(['ipc']);2133-expectNotAssignable<StdioOptionSync>(['ipc']);2134-execa('unicorns', {stdin: 0});2135-execaSync('unicorns', {stdin: 0});2136-execa('unicorns', {stdin: [0]});2137-execaSync('unicorns', {stdin: [0]});2138-expectError(execa('unicorns', {stdin: [1]}));2139-expectError(execa('unicorns', {stdin: [2]}));2140-execa('unicorns', {stdin: 3});2141-execaSync('unicorns', {stdin: 3});2142-expectError(execa('unicorns', {stdin: [3]}));2143-execaSync('unicorns', {stdin: [3]});2144-expectError(execa('unicorns', {stdout: [0]}));2145-execa('unicorns', {stdout: 1});2146-execaSync('unicorns', {stdout: 1});2147-execa('unicorns', {stdout: [1]});2148-execaSync('unicorns', {stdout: [1]});2149-execa('unicorns', {stdout: 2});2150-execaSync('unicorns', {stdout: 2});2151-execa('unicorns', {stdout: [2]});2152-execaSync('unicorns', {stdout: [2]});2153-execa('unicorns', {stdout: 3});2154-execaSync('unicorns', {stdout: 3});2155-expectError(execa('unicorns', {stdout: [3]}));2156-execaSync('unicorns', {stdout: [3]});2157-expectError(execa('unicorns', {stderr: [0]}));2158-execa('unicorns', {stderr: 1});2159-execaSync('unicorns', {stderr: 1});2160-execa('unicorns', {stderr: [1]});2161-execaSync('unicorns', {stderr: [1]});2162-execa('unicorns', {stderr: 1});2163-execaSync('unicorns', {stderr: 2});2164-execa('unicorns', {stderr: [2]});2165-execaSync('unicorns', {stderr: [2]});2166-execa('unicorns', {stderr: 3});2167-execaSync('unicorns', {stderr: 3});2168-expectError(execa('unicorns', {stderr: [3]}));2169-execaSync('unicorns', {stderr: [3]});2170-expectError(execa('unicorns', {stdio: 0}));2171-expectError(execaSync('unicorns', {stdio: 0}));2172-expectError(execa('unicorns', {stdio: 1}));2173-expectError(execaSync('unicorns', {stdio: 1}));2174-expectError(execa('unicorns', {stdio: 2}));2175-expectError(execaSync('unicorns', {stdio: 2}));2176-expectError(execa('unicorns', {stdio: 3}));2177-expectError(execaSync('unicorns', {stdio: 3}));2178-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 0]});2179-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 0]});2180-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [0]]});2181-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [0]]});2182-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 1]});2183-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 1]});2184-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [1]]});2185-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [1]]});2186-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 2]});2187-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 2]});2188-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [2]]});2189-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [2]]});2190-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 3]});2191-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 3]});2192-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [3]]}));2193-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [3]]});2194-expectAssignable<StdinOption>(0);2195-expectAssignable<StdinOptionSync>(0);2196-expectAssignable<StdinOption>([0]);2197-expectAssignable<StdinOptionSync>([0]);2198-expectAssignable<StdoutStderrOption>(1);2199-expectAssignable<StdoutStderrOptionSync>(1);2200-expectAssignable<StdoutStderrOption>([1]);2201-expectAssignable<StdoutStderrOptionSync>([1]);2202-expectAssignable<StdoutStderrOption>(2);2203-expectAssignable<StdoutStderrOptionSync>(2);2204-expectAssignable<StdoutStderrOption>([2]);2205-expectAssignable<StdoutStderrOptionSync>([2]);2206-expectAssignable<StdioOption>(3);2207-expectAssignable<StdioOptionSync>(3);2208-expectNotAssignable<StdioOption>([3]);2209-expectAssignable<StdioOptionSync>([3]);2210-execa('unicorns', {stdin: process.stdin});2211-execaSync('unicorns', {stdin: process.stdin});2212-execa('unicorns', {stdin: [process.stdin]});2213-expectError(execaSync('unicorns', {stdin: [process.stdin]}));2214-execa('unicorns', {stdout: process.stdout});2215-execaSync('unicorns', {stdout: process.stdout});2216-execa('unicorns', {stdout: [process.stdout]});2217-expectError(execaSync('unicorns', {stdout: [process.stdout]}));2218-execa('unicorns', {stderr: process.stderr});2219-execaSync('unicorns', {stderr: process.stderr});2220-execa('unicorns', {stderr: [process.stderr]});2221-expectError(execaSync('unicorns', {stderr: [process.stderr]}));2222-expectError(execa('unicorns', {stdio: process.stderr}));2223-expectError(execaSync('unicorns', {stdio: process.stderr}));2224-expectAssignable<StdinOption>(process.stdin);2225-expectAssignable<StdinOptionSync>(process.stdin);2226-expectAssignable<StdinOption>([process.stdin]);2227-expectNotAssignable<StdinOptionSync>([process.stdin]);2228-expectAssignable<StdoutStderrOption>(process.stdout);2229-expectAssignable<StdoutStderrOptionSync>(process.stdout);2230-expectAssignable<StdoutStderrOption>([process.stdout]);2231-expectNotAssignable<StdoutStderrOptionSync>([process.stdout]);2232-expectAssignable<StdoutStderrOption>(process.stderr);2233-expectAssignable<StdoutStderrOptionSync>(process.stderr);2234-expectAssignable<StdoutStderrOption>([process.stderr]);2235-expectNotAssignable<StdoutStderrOptionSync>([process.stderr]);2236-execa('unicorns', {stdin: new Readable()});2237-execaSync('unicorns', {stdin: new Readable()});2238-execa('unicorns', {stdin: [new Readable()]});2239-expectError(execaSync('unicorns', {stdin: [new Readable()]}));2240-expectError(execa('unicorns', {stdout: new Readable()}));2241-expectError(execaSync('unicorns', {stdout: new Readable()}));2242-expectError(execa('unicorns', {stdout: [new Readable()]}));2243-expectError(execaSync('unicorns', {stdout: [new Readable()]}));2244-expectError(execa('unicorns', {stderr: new Readable()}));2245-expectError(execaSync('unicorns', {stderr: new Readable()}));2246-expectError(execa('unicorns', {stderr: [new Readable()]}));2247-expectError(execaSync('unicorns', {stderr: [new Readable()]}));2248-expectError(execa('unicorns', {stdio: new Readable()}));2249-expectError(execaSync('unicorns', {stdio: new Readable()}));2250-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Readable()]});2251-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Readable()]});2252-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Readable()]]});2253-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Readable()]]}));2254-expectAssignable<StdinOption>(new Readable());2255-expectAssignable<StdinOptionSync>(new Readable());2256-expectAssignable<StdinOption>([new Readable()]);2257-expectNotAssignable<StdinOptionSync>([new Readable()]);2258-expectNotAssignable<StdoutStderrOption>(new Readable());2259-expectNotAssignable<StdoutStderrOptionSync>(new Readable());2260-expectNotAssignable<StdoutStderrOption>([new Readable()]);2261-expectNotAssignable<StdoutStderrOptionSync>([new Readable()]);2262-expectAssignable<StdioOption>(new Readable());2263-expectAssignable<StdioOptionSync>(new Readable());2264-expectAssignable<StdioOption>([new Readable()]);2265-expectNotAssignable<StdioOptionSync>([new Readable()]);2266-expectError(execa('unicorns', {stdin: new Writable()}));2267-expectError(execaSync('unicorns', {stdin: new Writable()}));2268-expectError(execa('unicorns', {stdin: [new Writable()]}));2269-expectError(execaSync('unicorns', {stdin: [new Writable()]}));2270-execa('unicorns', {stdout: new Writable()});2271-execaSync('unicorns', {stdout: new Writable()});2272-execa('unicorns', {stdout: [new Writable()]});2273-expectError(execaSync('unicorns', {stdout: [new Writable()]}));2274-execa('unicorns', {stderr: new Writable()});2275-execaSync('unicorns', {stderr: new Writable()});2276-execa('unicorns', {stderr: [new Writable()]});2277-expectError(execaSync('unicorns', {stderr: [new Writable()]}));2278-expectError(execa('unicorns', {stdio: new Writable()}));2279-expectError(execaSync('unicorns', {stdio: new Writable()}));2280-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Writable()]});2281-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Writable()]});2282-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Writable()]]});2283-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Writable()]]}));2284-expectNotAssignable<StdinOption>(new Writable());2285-expectNotAssignable<StdinOptionSync>(new Writable());2286-expectNotAssignable<StdinOption>([new Writable()]);2287-expectNotAssignable<StdinOptionSync>([new Writable()]);2288-expectAssignable<StdoutStderrOption>(new Writable());2289-expectAssignable<StdoutStderrOptionSync>(new Writable());2290-expectAssignable<StdoutStderrOption>([new Writable()]);2291-expectNotAssignable<StdoutStderrOptionSync>([new Writable()]);2292-expectAssignable<StdioOption>(new Writable());2293-expectAssignable<StdioOptionSync>(new Writable());2294-expectAssignable<StdioOption>([new Writable()]);2295-expectNotAssignable<StdioOptionSync>([new Writable()]);2296-execa('unicorns', {stdin: new ReadableStream()});2297-expectError(execaSync('unicorns', {stdin: new ReadableStream()}));2298-execa('unicorns', {stdin: [new ReadableStream()]});2299-expectError(execaSync('unicorns', {stdin: [new ReadableStream()]}));2300-expectError(execa('unicorns', {stdout: new ReadableStream()}));2301-expectError(execaSync('unicorns', {stdout: new ReadableStream()}));2302-expectError(execa('unicorns', {stdout: [new ReadableStream()]}));2303-expectError(execaSync('unicorns', {stdout: [new ReadableStream()]}));2304-expectError(execa('unicorns', {stderr: new ReadableStream()}));2305-expectError(execaSync('unicorns', {stderr: new ReadableStream()}));2306-expectError(execa('unicorns', {stderr: [new ReadableStream()]}));2307-expectError(execaSync('unicorns', {stderr: [new ReadableStream()]}));2308-expectError(execa('unicorns', {stdio: new ReadableStream()}));2309-expectError(execaSync('unicorns', {stdio: new ReadableStream()}));2310-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new ReadableStream()]});2311-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new ReadableStream()]}));2312-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new ReadableStream()]]});2313-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new ReadableStream()]]}));2314-expectAssignable<StdinOption>(new ReadableStream());2315-expectNotAssignable<StdinOptionSync>(new ReadableStream());2316-expectAssignable<StdinOption>([new ReadableStream()]);2317-expectNotAssignable<StdinOptionSync>([new ReadableStream()]);2318-expectNotAssignable<StdoutStderrOption>(new ReadableStream());2319-expectNotAssignable<StdoutStderrOptionSync>(new ReadableStream());2320-expectNotAssignable<StdoutStderrOption>([new ReadableStream()]);2321-expectNotAssignable<StdoutStderrOptionSync>([new ReadableStream()]);2322-expectAssignable<StdioOption>(new ReadableStream());2323-expectNotAssignable<StdioOptionSync>(new ReadableStream());2324-expectAssignable<StdioOption>([new ReadableStream()]);2325-expectNotAssignable<StdioOptionSync>([new ReadableStream()]);2326-expectError(execa('unicorns', {stdin: new WritableStream()}));2327-expectError(execaSync('unicorns', {stdin: new WritableStream()}));2328-expectError(execa('unicorns', {stdin: [new WritableStream()]}));2329-expectError(execaSync('unicorns', {stdin: [new WritableStream()]}));2330-execa('unicorns', {stdout: new WritableStream()});2331-expectError(execaSync('unicorns', {stdout: new WritableStream()}));2332-execa('unicorns', {stdout: [new WritableStream()]});2333-expectError(execaSync('unicorns', {stdout: [new WritableStream()]}));2334-execa('unicorns', {stderr: new WritableStream()});2335-expectError(execaSync('unicorns', {stderr: new WritableStream()}));2336-execa('unicorns', {stderr: [new WritableStream()]});2337-expectError(execaSync('unicorns', {stderr: [new WritableStream()]}));2338-expectError(execa('unicorns', {stdio: new WritableStream()}));2339-expectError(execaSync('unicorns', {stdio: new WritableStream()}));2340-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new WritableStream()]});2341-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new WritableStream()]}));2342-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new WritableStream()]]});2343-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new WritableStream()]]}));2344-expectNotAssignable<StdinOption>(new WritableStream());2345-expectNotAssignable<StdinOptionSync>(new WritableStream());2346-expectNotAssignable<StdinOption>([new WritableStream()]);2347-expectNotAssignable<StdinOptionSync>([new WritableStream()]);2348-expectAssignable<StdoutStderrOption>(new WritableStream());2349-expectNotAssignable<StdoutStderrOptionSync>(new WritableStream());2350-expectAssignable<StdoutStderrOption>([new WritableStream()]);2351-expectNotAssignable<StdoutStderrOptionSync>([new WritableStream()]);2352-expectAssignable<StdioOption>(new WritableStream());2353-expectNotAssignable<StdioOptionSync>(new WritableStream());2354-expectAssignable<StdioOption>([new WritableStream()]);2355-expectNotAssignable<StdioOptionSync>([new WritableStream()]);2356-execa('unicorns', {stdin: new Uint8Array()});2357-execaSync('unicorns', {stdin: new Uint8Array()});2358-execa('unicorns', {stdin: [new Uint8Array()]});2359-execaSync('unicorns', {stdin: [new Uint8Array()]});2360-expectError(execa('unicorns', {stdout: new Uint8Array()}));2361-expectError(execaSync('unicorns', {stdout: new Uint8Array()}));2362-expectError(execa('unicorns', {stdout: [new Uint8Array()]}));2363-expectError(execaSync('unicorns', {stdout: [new Uint8Array()]}));2364-expectError(execa('unicorns', {stderr: new Uint8Array()}));2365-expectError(execaSync('unicorns', {stderr: new Uint8Array()}));2366-expectError(execa('unicorns', {stderr: [new Uint8Array()]}));2367-expectError(execaSync('unicorns', {stderr: [new Uint8Array()]}));2368-expectError(execa('unicorns', {stdio: new Uint8Array()}));2369-expectError(execaSync('unicorns', {stdio: new Uint8Array()}));2370-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Uint8Array()]});2371-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', new Uint8Array()]}));2372-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Uint8Array()]]});2373-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [new Uint8Array()]]}));2374-expectAssignable<StdinOption>(new Uint8Array());2375-expectAssignable<StdinOptionSync>(new Uint8Array());2376-expectAssignable<StdinOption>([new Uint8Array()]);2377-expectAssignable<StdinOptionSync>([new Uint8Array()]);2378-expectNotAssignable<StdoutStderrOption>(new Uint8Array());2379-expectNotAssignable<StdoutStderrOptionSync>(new Uint8Array());2380-expectNotAssignable<StdoutStderrOption>([new Uint8Array()]);2381-expectNotAssignable<StdoutStderrOptionSync>([new Uint8Array()]);2382-expectAssignable<StdioOption>(new Uint8Array());2383-expectAssignable<StdioOptionSync>(new Uint8Array());2384-expectAssignable<StdioOption>([new Uint8Array()]);2385-expectAssignable<StdioOptionSync>([new Uint8Array()]);2386-execa('unicorns', {stdin: fileUrl});2387-execaSync('unicorns', {stdin: fileUrl});2388-execa('unicorns', {stdin: [fileUrl]});2389-execaSync('unicorns', {stdin: [fileUrl]});2390-execa('unicorns', {stdout: fileUrl});2391-execaSync('unicorns', {stdout: fileUrl});2392-execa('unicorns', {stdout: [fileUrl]});2393-execaSync('unicorns', {stdout: [fileUrl]});2394-execa('unicorns', {stderr: fileUrl});2395-execaSync('unicorns', {stderr: fileUrl});2396-execa('unicorns', {stderr: [fileUrl]});2397-execaSync('unicorns', {stderr: [fileUrl]});2398-expectError(execa('unicorns', {stdio: fileUrl}));2399-expectError(execaSync('unicorns', {stdio: fileUrl}));2400-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileUrl]});2401-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileUrl]});2402-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileUrl]]});2403-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileUrl]]});2404-expectAssignable<StdinOption>(fileUrl);2405-expectAssignable<StdinOptionSync>(fileUrl);2406-expectAssignable<StdinOption>([fileUrl]);2407-expectAssignable<StdinOptionSync>([fileUrl]);2408-expectAssignable<StdoutStderrOption>(fileUrl);2409-expectAssignable<StdoutStderrOptionSync>(fileUrl);2410-expectAssignable<StdoutStderrOption>([fileUrl]);2411-expectAssignable<StdoutStderrOptionSync>([fileUrl]);2412-expectAssignable<StdioOption>(fileUrl);2413-expectAssignable<StdioOptionSync>(fileUrl);2414-expectAssignable<StdioOption>([fileUrl]);2415-expectAssignable<StdioOptionSync>([fileUrl]);2416-execa('unicorns', {stdin: fileObject});2417-execaSync('unicorns', {stdin: fileObject});2418-execa('unicorns', {stdin: [fileObject]});2419-execaSync('unicorns', {stdin: [fileObject]});2420-execa('unicorns', {stdout: fileObject});2421-execaSync('unicorns', {stdout: fileObject});2422-execa('unicorns', {stdout: [fileObject]});2423-execaSync('unicorns', {stdout: [fileObject]});2424-execa('unicorns', {stderr: fileObject});2425-execaSync('unicorns', {stderr: fileObject});2426-execa('unicorns', {stderr: [fileObject]});2427-execaSync('unicorns', {stderr: [fileObject]});2428-expectError(execa('unicorns', {stdio: fileObject}));2429-expectError(execaSync('unicorns', {stdio: fileObject}));2430-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileObject]});2431-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', fileObject]});2432-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileObject]]});2433-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [fileObject]]});2434-expectAssignable<StdinOption>(fileObject);2435-expectAssignable<StdinOptionSync>(fileObject);2436-expectAssignable<StdinOption>([fileObject]);2437-expectAssignable<StdinOptionSync>([fileObject]);2438-expectAssignable<StdoutStderrOption>(fileObject);2439-expectAssignable<StdoutStderrOptionSync>(fileObject);2440-expectAssignable<StdoutStderrOption>([fileObject]);2441-expectAssignable<StdoutStderrOptionSync>([fileObject]);2442-expectAssignable<StdioOption>(fileObject);2443-expectAssignable<StdioOptionSync>(fileObject);2444-expectAssignable<StdioOption>([fileObject]);2445-expectAssignable<StdioOptionSync>([fileObject]);2446-expectError(execa('unicorns', {stdin: invalidFileObject}));2447-expectError(execaSync('unicorns', {stdin: invalidFileObject}));2448-expectError(execa('unicorns', {stdin: [invalidFileObject]}));2449-expectError(execaSync('unicorns', {stdin: [invalidFileObject]}));2450-expectError(execa('unicorns', {stdout: invalidFileObject}));2451-expectError(execaSync('unicorns', {stdout: invalidFileObject}));2452-expectError(execa('unicorns', {stdout: [invalidFileObject]}));2453-expectError(execaSync('unicorns', {stdout: [invalidFileObject]}));2454-expectError(execa('unicorns', {stderr: invalidFileObject}));2455-expectError(execaSync('unicorns', {stderr: invalidFileObject}));2456-expectError(execa('unicorns', {stderr: [invalidFileObject]}));2457-expectError(execaSync('unicorns', {stderr: [invalidFileObject]}));2458-expectError(execa('unicorns', {stdio: invalidFileObject}));2459-expectError(execaSync('unicorns', {stdio: invalidFileObject}));2460-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidFileObject]}));2461-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidFileObject]}));2462-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidFileObject]]}));2463-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidFileObject]]}));2464-expectNotAssignable<StdinOption>(invalidFileObject);2465-expectNotAssignable<StdinOptionSync>(invalidFileObject);2466-expectNotAssignable<StdinOption>([invalidFileObject]);2467-expectNotAssignable<StdinOptionSync>([invalidFileObject]);2468-expectNotAssignable<StdoutStderrOption>(invalidFileObject);2469-expectNotAssignable<StdoutStderrOptionSync>(invalidFileObject);2470-expectNotAssignable<StdoutStderrOption>([invalidFileObject]);2471-expectNotAssignable<StdoutStderrOptionSync>([invalidFileObject]);2472-expectNotAssignable<StdioOption>(invalidFileObject);2473-expectNotAssignable<StdioOptionSync>(invalidFileObject);2474-expectNotAssignable<StdioOption>([invalidFileObject]);2475-expectNotAssignable<StdioOptionSync>([invalidFileObject]);2476-execa('unicorns', {stdin: [stringArray]});2477-execaSync('unicorns', {stdin: [stringArray]});2478-expectError(execa('unicorns', {stdout: [stringArray]}));2479-expectError(execaSync('unicorns', {stdout: [stringArray]}));2480-expectError(execa('unicorns', {stderr: [stringArray]}));2481-expectError(execaSync('unicorns', {stderr: [stringArray]}));2482-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringArray]]});2483-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringArray]]}));2484-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[stringArray]]]});2485-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[stringArray]]]}));2486-expectAssignable<StdinOption>([stringArray]);2487-expectAssignable<StdinOptionSync>([stringArray]);2488-expectNotAssignable<StdoutStderrOption>([stringArray]);2489-expectNotAssignable<StdoutStderrOptionSync>([stringArray]);2490-expectAssignable<StdioOption>([stringArray]);2491-expectAssignable<StdioOptionSync>([stringArray]);2492-execa('unicorns', {stdin: [binaryArray]});2493-execaSync('unicorns', {stdin: [binaryArray]});2494-expectError(execa('unicorns', {stdout: [binaryArray]}));2495-expectError(execaSync('unicorns', {stdout: [binaryArray]}));2496-expectError(execa('unicorns', {stderr: [binaryArray]}));2497-expectError(execaSync('unicorns', {stderr: [binaryArray]}));2498-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]});2499-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryArray]]}));2500-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]});2501-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[binaryArray]]]}));2502-expectAssignable<StdinOption>([binaryArray]);2503-expectAssignable<StdinOptionSync>([binaryArray]);2504-expectNotAssignable<StdoutStderrOption>([binaryArray]);2505-expectNotAssignable<StdoutStderrOptionSync>([binaryArray]);2506-expectAssignable<StdioOption>([binaryArray]);2507-expectAssignable<StdioOptionSync>([binaryArray]);2508-execa('unicorns', {stdin: [objectArray]});2509-execaSync('unicorns', {stdin: [objectArray]});2510-expectError(execa('unicorns', {stdout: [objectArray]}));2511-expectError(execaSync('unicorns', {stdout: [objectArray]}));2512-expectError(execa('unicorns', {stderr: [objectArray]}));2513-expectError(execaSync('unicorns', {stderr: [objectArray]}));2514-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]});2515-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectArray]]}));2516-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]});2517-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [[objectArray]]]}));2518-expectAssignable<StdinOption>([objectArray]);2519-expectAssignable<StdinOptionSync>([objectArray]);2520-expectNotAssignable<StdoutStderrOption>([objectArray]);2521-expectNotAssignable<StdoutStderrOptionSync>([objectArray]);2522-expectAssignable<StdioOption>([objectArray]);2523-expectAssignable<StdioOptionSync>([objectArray]);2524-execa('unicorns', {stdin: stringIterable});2525-execaSync('unicorns', {stdin: stringIterable});2526-execa('unicorns', {stdin: [stringIterable]});2527-execaSync('unicorns', {stdin: [stringIterable]});2528-expectError(execa('unicorns', {stdout: stringIterable}));2529-expectError(execaSync('unicorns', {stdout: stringIterable}));2530-expectError(execa('unicorns', {stdout: [stringIterable]}));2531-expectError(execaSync('unicorns', {stdout: [stringIterable]}));2532-expectError(execa('unicorns', {stderr: stringIterable}));2533-expectError(execaSync('unicorns', {stderr: stringIterable}));2534-expectError(execa('unicorns', {stderr: [stringIterable]}));2535-expectError(execaSync('unicorns', {stderr: [stringIterable]}));2536-expectError(execa('unicorns', {stdio: stringIterable}));2537-expectError(execaSync('unicorns', {stdio: stringIterable}));2538-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringIterable]});2539-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringIterable]}));2540-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringIterable]]});2541-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringIterable]]}));2542-expectAssignable<StdinOption>(stringIterable);2543-expectAssignable<StdinOptionSync>(stringIterable);2544-expectAssignable<StdinOption>([stringIterable]);2545-expectAssignable<StdinOptionSync>([stringIterable]);2546-expectNotAssignable<StdoutStderrOption>(stringIterable);2547-expectNotAssignable<StdoutStderrOptionSync>(stringIterable);2548-expectNotAssignable<StdoutStderrOption>([stringIterable]);2549-expectNotAssignable<StdoutStderrOptionSync>([stringIterable]);2550-expectAssignable<StdioOption>(stringIterable);2551-expectAssignable<StdioOptionSync>(stringIterable);2552-expectAssignable<StdioOption>([stringIterable]);2553-expectAssignable<StdioOptionSync>([stringIterable]);2554-execa('unicorns', {stdin: binaryIterable});2555-execaSync('unicorns', {stdin: binaryIterable});2556-execa('unicorns', {stdin: [binaryIterable]});2557-execaSync('unicorns', {stdin: [binaryIterable]});2558-expectError(execa('unicorns', {stdout: binaryIterable}));2559-expectError(execaSync('unicorns', {stdout: binaryIterable}));2560-expectError(execa('unicorns', {stdout: [binaryIterable]}));2561-expectError(execaSync('unicorns', {stdout: [binaryIterable]}));2562-expectError(execa('unicorns', {stderr: binaryIterable}));2563-expectError(execaSync('unicorns', {stderr: binaryIterable}));2564-expectError(execa('unicorns', {stderr: [binaryIterable]}));2565-expectError(execaSync('unicorns', {stderr: [binaryIterable]}));2566-expectError(execa('unicorns', {stdio: binaryIterable}));2567-expectError(execaSync('unicorns', {stdio: binaryIterable}));2568-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryIterable]});2569-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryIterable]}));2570-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryIterable]]});2571-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryIterable]]}));2572-expectAssignable<StdinOption>(binaryIterable);2573-expectAssignable<StdinOptionSync>(binaryIterable);2574-expectAssignable<StdinOption>([binaryIterable]);2575-expectAssignable<StdinOptionSync>([binaryIterable]);2576-expectNotAssignable<StdoutStderrOption>(binaryIterable);2577-expectNotAssignable<StdoutStderrOptionSync>(binaryIterable);2578-expectNotAssignable<StdoutStderrOption>([binaryIterable]);2579-expectNotAssignable<StdoutStderrOptionSync>([binaryIterable]);2580-expectAssignable<StdioOption>(binaryIterable);2581-expectAssignable<StdioOptionSync>(binaryIterable);2582-expectAssignable<StdioOption>([binaryIterable]);2583-expectAssignable<StdioOptionSync>([binaryIterable]);2584-execa('unicorns', {stdin: objectIterable});2585-execaSync('unicorns', {stdin: objectIterable});2586-execa('unicorns', {stdin: [objectIterable]});2587-execaSync('unicorns', {stdin: [objectIterable]});2588-expectError(execa('unicorns', {stdout: objectIterable}));2589-expectError(execaSync('unicorns', {stdout: objectIterable}));2590-expectError(execa('unicorns', {stdout: [objectIterable]}));2591-expectError(execaSync('unicorns', {stdout: [objectIterable]}));2592-expectError(execa('unicorns', {stderr: objectIterable}));2593-expectError(execaSync('unicorns', {stderr: objectIterable}));2594-expectError(execa('unicorns', {stderr: [objectIterable]}));2595-expectError(execaSync('unicorns', {stderr: [objectIterable]}));2596-expectError(execa('unicorns', {stdio: objectIterable}));2597-expectError(execaSync('unicorns', {stdio: objectIterable}));2598-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectIterable]});2599-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectIterable]}));2600-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectIterable]]});2601-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectIterable]]}));2602-expectAssignable<StdinOption>(objectIterable);2603-expectAssignable<StdinOptionSync>(objectIterable);2604-expectAssignable<StdinOption>([objectIterable]);2605-expectAssignable<StdinOptionSync>([objectIterable]);2606-expectNotAssignable<StdoutStderrOption>(objectIterable);2607-expectNotAssignable<StdoutStderrOptionSync>(objectIterable);2608-expectNotAssignable<StdoutStderrOption>([objectIterable]);2609-expectNotAssignable<StdoutStderrOptionSync>([objectIterable]);2610-expectAssignable<StdioOption>(objectIterable);2611-expectAssignable<StdioOptionSync>(objectIterable);2612-expectAssignable<StdioOption>([objectIterable]);2613-expectAssignable<StdioOptionSync>([objectIterable]);2614-execa('unicorns', {stdin: asyncStringIterable});2615-expectError(execaSync('unicorns', {stdin: asyncStringIterable}));2616-execa('unicorns', {stdin: [asyncStringIterable]});2617-expectError(execaSync('unicorns', {stdin: [asyncStringIterable]}));2618-expectError(execa('unicorns', {stdout: asyncStringIterable}));2619-expectError(execaSync('unicorns', {stdout: asyncStringIterable}));2620-expectError(execa('unicorns', {stdout: [asyncStringIterable]}));2621-expectError(execaSync('unicorns', {stdout: [asyncStringIterable]}));2622-expectError(execa('unicorns', {stderr: asyncStringIterable}));2623-expectError(execaSync('unicorns', {stderr: asyncStringIterable}));2624-expectError(execa('unicorns', {stderr: [asyncStringIterable]}));2625-expectError(execaSync('unicorns', {stderr: [asyncStringIterable]}));2626-expectError(execa('unicorns', {stdio: asyncStringIterable}));2627-expectError(execaSync('unicorns', {stdio: asyncStringIterable}));2628-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncStringIterable]});2629-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncStringIterable]}));2630-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncStringIterable]]});2631-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncStringIterable]]}));2632-expectAssignable<StdinOption>(asyncStringIterable);2633-expectNotAssignable<StdinOptionSync>(asyncStringIterable);2634-expectAssignable<StdinOption>([asyncStringIterable]);2635-expectNotAssignable<StdinOptionSync>([asyncStringIterable]);2636-expectNotAssignable<StdoutStderrOption>(asyncStringIterable);2637-expectNotAssignable<StdoutStderrOptionSync>(asyncStringIterable);2638-expectNotAssignable<StdoutStderrOption>([asyncStringIterable]);2639-expectNotAssignable<StdoutStderrOptionSync>([asyncStringIterable]);2640-expectAssignable<StdioOption>(asyncStringIterable);2641-expectNotAssignable<StdioOptionSync>(asyncStringIterable);2642-expectAssignable<StdioOption>([asyncStringIterable]);2643-expectNotAssignable<StdioOptionSync>([asyncStringIterable]);2644-execa('unicorns', {stdin: asyncBinaryIterable});2645-expectError(execaSync('unicorns', {stdin: asyncBinaryIterable}));2646-execa('unicorns', {stdin: [asyncBinaryIterable]});2647-expectError(execaSync('unicorns', {stdin: [asyncBinaryIterable]}));2648-expectError(execa('unicorns', {stdout: asyncBinaryIterable}));2649-expectError(execaSync('unicorns', {stdout: asyncBinaryIterable}));2650-expectError(execa('unicorns', {stdout: [asyncBinaryIterable]}));2651-expectError(execaSync('unicorns', {stdout: [asyncBinaryIterable]}));2652-expectError(execa('unicorns', {stderr: asyncBinaryIterable}));2653-expectError(execaSync('unicorns', {stderr: asyncBinaryIterable}));2654-expectError(execa('unicorns', {stderr: [asyncBinaryIterable]}));2655-expectError(execaSync('unicorns', {stderr: [asyncBinaryIterable]}));2656-expectError(execa('unicorns', {stdio: asyncBinaryIterable}));2657-expectError(execaSync('unicorns', {stdio: asyncBinaryIterable}));2658-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncBinaryIterable]});2659-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncBinaryIterable]}));2660-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncBinaryIterable]]});2661-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncBinaryIterable]]}));2662-expectAssignable<StdinOption>(asyncBinaryIterable);2663-expectNotAssignable<StdinOptionSync>(asyncBinaryIterable);2664-expectAssignable<StdinOption>([asyncBinaryIterable]);2665-expectNotAssignable<StdinOptionSync>([asyncBinaryIterable]);2666-expectNotAssignable<StdoutStderrOption>(asyncBinaryIterable);2667-expectNotAssignable<StdoutStderrOptionSync>(asyncBinaryIterable);2668-expectNotAssignable<StdoutStderrOption>([asyncBinaryIterable]);2669-expectNotAssignable<StdoutStderrOptionSync>([asyncBinaryIterable]);2670-expectAssignable<StdioOption>(asyncBinaryIterable);2671-expectNotAssignable<StdioOptionSync>(asyncBinaryIterable);2672-expectAssignable<StdioOption>([asyncBinaryIterable]);2673-expectNotAssignable<StdioOptionSync>([asyncBinaryIterable]);2674-execa('unicorns', {stdin: asyncObjectIterable});2675-expectError(execaSync('unicorns', {stdin: asyncObjectIterable}));2676-execa('unicorns', {stdin: [asyncObjectIterable]});2677-expectError(execaSync('unicorns', {stdin: [asyncObjectIterable]}));2678-expectError(execa('unicorns', {stdout: asyncObjectIterable}));2679-expectError(execaSync('unicorns', {stdout: asyncObjectIterable}));2680-expectError(execa('unicorns', {stdout: [asyncObjectIterable]}));2681-expectError(execaSync('unicorns', {stdout: [asyncObjectIterable]}));2682-expectError(execa('unicorns', {stderr: asyncObjectIterable}));2683-expectError(execaSync('unicorns', {stderr: asyncObjectIterable}));2684-expectError(execa('unicorns', {stderr: [asyncObjectIterable]}));2685-expectError(execaSync('unicorns', {stderr: [asyncObjectIterable]}));2686-expectError(execa('unicorns', {stdio: asyncObjectIterable}));2687-expectError(execaSync('unicorns', {stdio: asyncObjectIterable}));2688-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncObjectIterable]});2689-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncObjectIterable]}));2690-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncObjectIterable]]});2691-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncObjectIterable]]}));2692-expectAssignable<StdinOption>(asyncObjectIterable);2693-expectNotAssignable<StdinOptionSync>(asyncObjectIterable);2694-expectAssignable<StdinOption>([asyncObjectIterable]);2695-expectNotAssignable<StdinOptionSync>([asyncObjectIterable]);2696-expectNotAssignable<StdoutStderrOption>(asyncObjectIterable);2697-expectNotAssignable<StdoutStderrOptionSync>(asyncObjectIterable);2698-expectNotAssignable<StdoutStderrOption>([asyncObjectIterable]);2699-expectNotAssignable<StdoutStderrOptionSync>([asyncObjectIterable]);2700-expectAssignable<StdioOption>(asyncObjectIterable);2701-expectNotAssignable<StdioOptionSync>(asyncObjectIterable);2702-expectAssignable<StdioOption>([asyncObjectIterable]);2703-expectNotAssignable<StdioOptionSync>([asyncObjectIterable]);2704-execa('unicorns', {stdin: duplex});2705-expectError(execaSync('unicorns', {stdin: duplex}));2706-execa('unicorns', {stdin: [duplex]});2707-expectError(execaSync('unicorns', {stdin: [duplex]}));2708-execa('unicorns', {stdout: duplex});2709-expectError(execaSync('unicorns', {stdout: duplex}));2710-execa('unicorns', {stdout: [duplex]});2711-expectError(execaSync('unicorns', {stdout: [duplex]}));2712-execa('unicorns', {stderr: duplex});2713-expectError(execaSync('unicorns', {stderr: duplex}));2714-execa('unicorns', {stderr: [duplex]});2715-expectError(execaSync('unicorns', {stderr: [duplex]}));2716-expectError(execa('unicorns', {stdio: duplex}));2717-expectError(execaSync('unicorns', {stdio: duplex}));2718-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplex]});2719-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplex]}));2720-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplex]]});2721-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplex]]}));2722-expectAssignable<StdinOption>(duplex);2723-expectNotAssignable<StdinOptionSync>(duplex);2724-expectAssignable<StdinOption>([duplex]);2725-expectNotAssignable<StdinOptionSync>([duplex]);2726-expectAssignable<StdoutStderrOption>(duplex);2727-expectNotAssignable<StdoutStderrOptionSync>(duplex);2728-expectAssignable<StdoutStderrOption>([duplex]);2729-expectNotAssignable<StdoutStderrOptionSync>([duplex]);2730-expectAssignable<StdioOption>(duplex);2731-expectNotAssignable<StdioOptionSync>(duplex);2732-expectAssignable<StdioOption>([duplex]);2733-expectNotAssignable<StdioOptionSync>([duplex]);2734-execa('unicorns', {stdin: duplexTransform});2735-expectError(execaSync('unicorns', {stdin: duplexTransform}));2736-execa('unicorns', {stdin: [duplexTransform]});2737-expectError(execaSync('unicorns', {stdin: [duplexTransform]}));2738-execa('unicorns', {stdout: duplexTransform});2739-expectError(execaSync('unicorns', {stdout: duplexTransform}));2740-execa('unicorns', {stdout: [duplexTransform]});2741-expectError(execaSync('unicorns', {stdout: [duplexTransform]}));2742-execa('unicorns', {stderr: duplexTransform});2743-expectError(execaSync('unicorns', {stderr: duplexTransform}));2744-execa('unicorns', {stderr: [duplexTransform]});2745-expectError(execaSync('unicorns', {stderr: [duplexTransform]}));2746-expectError(execa('unicorns', {stdio: duplexTransform}));2747-expectError(execaSync('unicorns', {stdio: duplexTransform}));2748-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexTransform]});2749-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexTransform]}));2750-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexTransform]]});2751-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexTransform]]}));2752-expectAssignable<StdinOption>(duplexTransform);2753-expectNotAssignable<StdinOptionSync>(duplexTransform);2754-expectAssignable<StdinOption>([duplexTransform]);2755-expectNotAssignable<StdinOptionSync>([duplexTransform]);2756-expectAssignable<StdoutStderrOption>(duplexTransform);2757-expectNotAssignable<StdoutStderrOptionSync>(duplexTransform);2758-expectAssignable<StdoutStderrOption>([duplexTransform]);2759-expectNotAssignable<StdoutStderrOptionSync>([duplexTransform]);2760-expectAssignable<StdioOption>(duplexTransform);2761-expectNotAssignable<StdioOptionSync>(duplexTransform);2762-expectAssignable<StdioOption>([duplexTransform]);2763-expectNotAssignable<StdioOptionSync>([duplexTransform]);2764-execa('unicorns', {stdin: duplexObjectProperty});2765-expectError(execaSync('unicorns', {stdin: duplexObjectProperty}));2766-execa('unicorns', {stdin: [duplexObjectProperty]});2767-expectError(execaSync('unicorns', {stdin: [duplexObjectProperty]}));2768-execa('unicorns', {stdout: duplexObjectProperty});2769-expectError(execaSync('unicorns', {stdout: duplexObjectProperty}));2770-execa('unicorns', {stdout: [duplexObjectProperty]});2771-expectError(execaSync('unicorns', {stdout: [duplexObjectProperty]}));2772-execa('unicorns', {stderr: duplexObjectProperty});2773-expectError(execaSync('unicorns', {stderr: duplexObjectProperty}));2774-execa('unicorns', {stderr: [duplexObjectProperty]});2775-expectError(execaSync('unicorns', {stderr: [duplexObjectProperty]}));2776-expectError(execa('unicorns', {stdio: duplexObjectProperty}));2777-expectError(execaSync('unicorns', {stdio: duplexObjectProperty}));2778-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexObjectProperty]});2779-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexObjectProperty]}));2780-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexObjectProperty]]});2781-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexObjectProperty]]}));2782-expectAssignable<StdinOption>(duplexObjectProperty);2783-expectNotAssignable<StdinOptionSync>(duplexObjectProperty);2784-expectAssignable<StdinOption>([duplexObjectProperty]);2785-expectNotAssignable<StdinOptionSync>([duplexObjectProperty]);2786-expectAssignable<StdoutStderrOption>(duplexObjectProperty);2787-expectNotAssignable<StdoutStderrOptionSync>(duplexObjectProperty);2788-expectAssignable<StdoutStderrOption>([duplexObjectProperty]);2789-expectNotAssignable<StdoutStderrOptionSync>([duplexObjectProperty]);2790-expectAssignable<StdioOption>(duplexObjectProperty);2791-expectNotAssignable<StdioOptionSync>(duplexObjectProperty);2792-expectAssignable<StdioOption>([duplexObjectProperty]);2793-expectNotAssignable<StdioOptionSync>([duplexObjectProperty]);2794-expectError(execa('unicorns', {stdin: duplexWithInvalidObjectMode}));2795-expectError(execaSync('unicorns', {stdin: duplexWithInvalidObjectMode}));2796-expectError(execa('unicorns', {stdin: [duplexWithInvalidObjectMode]}));2797-expectError(execaSync('unicorns', {stdin: [duplexWithInvalidObjectMode]}));2798-expectError(execa('unicorns', {stdout: duplexWithInvalidObjectMode}));2799-expectError(execaSync('unicorns', {stdout: duplexWithInvalidObjectMode}));2800-expectError(execa('unicorns', {stdout: [duplexWithInvalidObjectMode]}));2801-expectError(execaSync('unicorns', {stdout: [duplexWithInvalidObjectMode]}));2802-expectError(execa('unicorns', {stderr: duplexWithInvalidObjectMode}));2803-expectError(execaSync('unicorns', {stderr: duplexWithInvalidObjectMode}));2804-expectError(execa('unicorns', {stderr: [duplexWithInvalidObjectMode]}));2805-expectError(execaSync('unicorns', {stderr: [duplexWithInvalidObjectMode]}));2806-expectError(execa('unicorns', {stdio: duplexWithInvalidObjectMode}));2807-expectError(execaSync('unicorns', {stdio: duplexWithInvalidObjectMode}));2808-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexWithInvalidObjectMode]}));2809-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', duplexWithInvalidObjectMode]}));2810-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexWithInvalidObjectMode]]}));2811-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [duplexWithInvalidObjectMode]]}));2812-expectNotAssignable<StdinOption>(duplexWithInvalidObjectMode);2813-expectNotAssignable<StdinOptionSync>(duplexWithInvalidObjectMode);2814-expectNotAssignable<StdinOption>([duplexWithInvalidObjectMode]);2815-expectNotAssignable<StdinOptionSync>([duplexWithInvalidObjectMode]);2816-expectNotAssignable<StdoutStderrOption>(duplexWithInvalidObjectMode);2817-expectNotAssignable<StdoutStderrOptionSync>(duplexWithInvalidObjectMode);2818-expectNotAssignable<StdoutStderrOption>([duplexWithInvalidObjectMode]);2819-expectNotAssignable<StdoutStderrOptionSync>([duplexWithInvalidObjectMode]);2820-expectNotAssignable<StdioOption>(duplexWithInvalidObjectMode);2821-expectNotAssignable<StdioOptionSync>(duplexWithInvalidObjectMode);2822-expectNotAssignable<StdioOption>([duplexWithInvalidObjectMode]);2823-expectNotAssignable<StdioOptionSync>([duplexWithInvalidObjectMode]);2824-execa('unicorns', {stdin: webTransformInstance});2825-expectError(execaSync('unicorns', {stdin: webTransformInstance}));2826-execa('unicorns', {stdin: [webTransformInstance]});2827-expectError(execaSync('unicorns', {stdin: [webTransformInstance]}));2828-execa('unicorns', {stdout: webTransformInstance});2829-expectError(execaSync('unicorns', {stdout: webTransformInstance}));2830-execa('unicorns', {stdout: [webTransformInstance]});2831-expectError(execaSync('unicorns', {stdout: [webTransformInstance]}));2832-execa('unicorns', {stderr: webTransformInstance});2833-expectError(execaSync('unicorns', {stderr: webTransformInstance}));2834-execa('unicorns', {stderr: [webTransformInstance]});2835-expectError(execaSync('unicorns', {stderr: [webTransformInstance]}));2836-expectError(execa('unicorns', {stdio: webTransformInstance}));2837-expectError(execaSync('unicorns', {stdio: webTransformInstance}));2838-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformInstance]});2839-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformInstance]}));2840-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformInstance]]});2841-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformInstance]]}));2842-expectAssignable<StdinOption>(webTransformInstance);2843-expectNotAssignable<StdinOptionSync>(webTransformInstance);2844-expectAssignable<StdinOption>([webTransformInstance]);2845-expectNotAssignable<StdinOptionSync>([webTransformInstance]);2846-expectAssignable<StdoutStderrOption>(webTransformInstance);2847-expectNotAssignable<StdoutStderrOptionSync>(webTransformInstance);2848-expectAssignable<StdoutStderrOption>([webTransformInstance]);2849-expectNotAssignable<StdoutStderrOptionSync>([webTransformInstance]);2850-expectAssignable<StdioOption>(webTransformInstance);2851-expectNotAssignable<StdioOptionSync>(webTransformInstance);2852-expectAssignable<StdioOption>([webTransformInstance]);2853-expectNotAssignable<StdioOptionSync>([webTransformInstance]);2854-execa('unicorns', {stdin: webTransform});2855-expectError(execaSync('unicorns', {stdin: webTransform}));2856-execa('unicorns', {stdin: [webTransform]});2857-expectError(execaSync('unicorns', {stdin: [webTransform]}));2858-execa('unicorns', {stdout: webTransform});2859-expectError(execaSync('unicorns', {stdout: webTransform}));2860-execa('unicorns', {stdout: [webTransform]});2861-expectError(execaSync('unicorns', {stdout: [webTransform]}));2862-execa('unicorns', {stderr: webTransform});2863-expectError(execaSync('unicorns', {stderr: webTransform}));2864-execa('unicorns', {stderr: [webTransform]});2865-expectError(execaSync('unicorns', {stderr: [webTransform]}));2866-expectError(execa('unicorns', {stdio: webTransform}));2867-expectError(execaSync('unicorns', {stdio: webTransform}));2868-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransform]});2869-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransform]}));2870-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransform]]});2871-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransform]]}));2872-expectAssignable<StdinOption>(webTransform);2873-expectNotAssignable<StdinOptionSync>(webTransform);2874-expectAssignable<StdinOption>([webTransform]);2875-expectNotAssignable<StdinOptionSync>([webTransform]);2876-expectAssignable<StdoutStderrOption>(webTransform);2877-expectNotAssignable<StdoutStderrOptionSync>(webTransform);2878-expectAssignable<StdoutStderrOption>([webTransform]);2879-expectNotAssignable<StdoutStderrOptionSync>([webTransform]);2880-expectAssignable<StdioOption>(webTransform);2881-expectNotAssignable<StdioOptionSync>(webTransform);2882-expectAssignable<StdioOption>([webTransform]);2883-expectNotAssignable<StdioOptionSync>([webTransform]);2884-execa('unicorns', {stdin: webTransformObject});2885-expectError(execaSync('unicorns', {stdin: webTransformObject}));2886-execa('unicorns', {stdin: [webTransformObject]});2887-expectError(execaSync('unicorns', {stdin: [webTransformObject]}));2888-execa('unicorns', {stdout: webTransformObject});2889-expectError(execaSync('unicorns', {stdout: webTransformObject}));2890-execa('unicorns', {stdout: [webTransformObject]});2891-expectError(execaSync('unicorns', {stdout: [webTransformObject]}));2892-execa('unicorns', {stderr: webTransformObject});2893-expectError(execaSync('unicorns', {stderr: webTransformObject}));2894-execa('unicorns', {stderr: [webTransformObject]});2895-expectError(execaSync('unicorns', {stderr: [webTransformObject]}));2896-expectError(execa('unicorns', {stdio: webTransformObject}));2897-expectError(execaSync('unicorns', {stdio: webTransformObject}));2898-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformObject]});2899-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformObject]}));2900-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformObject]]});2901-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformObject]]}));2902-expectAssignable<StdinOption>(webTransformObject);2903-expectNotAssignable<StdinOptionSync>(webTransformObject);2904-expectAssignable<StdinOption>([webTransformObject]);2905-expectNotAssignable<StdinOptionSync>([webTransformObject]);2906-expectAssignable<StdoutStderrOption>(webTransformObject);2907-expectNotAssignable<StdoutStderrOptionSync>(webTransformObject);2908-expectAssignable<StdoutStderrOption>([webTransformObject]);2909-expectNotAssignable<StdoutStderrOptionSync>([webTransformObject]);2910-expectAssignable<StdioOption>(webTransformObject);2911-expectNotAssignable<StdioOptionSync>(webTransformObject);2912-expectAssignable<StdioOption>([webTransformObject]);2913-expectNotAssignable<StdioOptionSync>([webTransformObject]);2914-expectError(execa('unicorns', {stdin: webTransformWithInvalidObjectMode}));2915-expectError(execaSync('unicorns', {stdin: webTransformWithInvalidObjectMode}));2916-expectError(execa('unicorns', {stdin: [webTransformWithInvalidObjectMode]}));2917-expectError(execaSync('unicorns', {stdin: [webTransformWithInvalidObjectMode]}));2918-expectError(execa('unicorns', {stdout: webTransformWithInvalidObjectMode}));2919-expectError(execaSync('unicorns', {stdout: webTransformWithInvalidObjectMode}));2920-expectError(execa('unicorns', {stdout: [webTransformWithInvalidObjectMode]}));2921-expectError(execaSync('unicorns', {stdout: [webTransformWithInvalidObjectMode]}));2922-expectError(execa('unicorns', {stderr: webTransformWithInvalidObjectMode}));2923-expectError(execaSync('unicorns', {stderr: webTransformWithInvalidObjectMode}));2924-expectError(execa('unicorns', {stderr: [webTransformWithInvalidObjectMode]}));2925-expectError(execaSync('unicorns', {stderr: [webTransformWithInvalidObjectMode]}));2926-expectError(execa('unicorns', {stdio: webTransformWithInvalidObjectMode}));2927-expectError(execaSync('unicorns', {stdio: webTransformWithInvalidObjectMode}));2928-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformWithInvalidObjectMode]}));2929-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', webTransformWithInvalidObjectMode]}));2930-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformWithInvalidObjectMode]]}));2931-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [webTransformWithInvalidObjectMode]]}));2932-expectNotAssignable<StdinOption>(webTransformWithInvalidObjectMode);2933-expectNotAssignable<StdinOptionSync>(webTransformWithInvalidObjectMode);2934-expectNotAssignable<StdinOption>([webTransformWithInvalidObjectMode]);2935-expectNotAssignable<StdinOptionSync>([webTransformWithInvalidObjectMode]);2936-expectNotAssignable<StdoutStderrOption>(webTransformWithInvalidObjectMode);2937-expectNotAssignable<StdoutStderrOptionSync>(webTransformWithInvalidObjectMode);2938-expectNotAssignable<StdoutStderrOption>([webTransformWithInvalidObjectMode]);2939-expectNotAssignable<StdoutStderrOptionSync>([webTransformWithInvalidObjectMode]);2940-expectNotAssignable<StdioOption>(webTransformWithInvalidObjectMode);2941-expectNotAssignable<StdioOptionSync>(webTransformWithInvalidObjectMode);2942-expectNotAssignable<StdioOption>([webTransformWithInvalidObjectMode]);2943-expectNotAssignable<StdioOptionSync>([webTransformWithInvalidObjectMode]);2944-execa('unicorns', {stdin: unknownGenerator});2945-execaSync('unicorns', {stdin: unknownGenerator});2946-execa('unicorns', {stdin: [unknownGenerator]});2947-execaSync('unicorns', {stdin: [unknownGenerator]});2948-execa('unicorns', {stdout: unknownGenerator});2949-execaSync('unicorns', {stdout: unknownGenerator});2950-execa('unicorns', {stdout: [unknownGenerator]});2951-execaSync('unicorns', {stdout: [unknownGenerator]});2952-execa('unicorns', {stderr: unknownGenerator});2953-execaSync('unicorns', {stderr: unknownGenerator});2954-execa('unicorns', {stderr: [unknownGenerator]});2955-execaSync('unicorns', {stderr: [unknownGenerator]});2956-expectError(execa('unicorns', {stdio: unknownGenerator}));2957-expectError(execaSync('unicorns', {stdio: unknownGenerator}));2958-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGenerator]});2959-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGenerator]});2960-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGenerator]]});2961-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGenerator]]});2962-expectAssignable<StdinOption>(unknownGenerator);2963-expectAssignable<StdinOptionSync>(unknownGenerator);2964-expectAssignable<StdinOption>([unknownGenerator]);2965-expectAssignable<StdinOptionSync>([unknownGenerator]);2966-expectAssignable<StdoutStderrOption>(unknownGenerator);2967-expectAssignable<StdoutStderrOptionSync>(unknownGenerator);2968-expectAssignable<StdoutStderrOption>([unknownGenerator]);2969-expectAssignable<StdoutStderrOptionSync>([unknownGenerator]);2970-expectAssignable<StdioOption>(unknownGenerator);2971-expectAssignable<StdioOptionSync>(unknownGenerator);2972-expectAssignable<StdioOption>([unknownGenerator]);2973-expectAssignable<StdioOptionSync>([unknownGenerator]);2974-execa('unicorns', {stdin: unknownGeneratorFull});2975-execaSync('unicorns', {stdin: unknownGeneratorFull});2976-execa('unicorns', {stdin: [unknownGeneratorFull]});2977-execaSync('unicorns', {stdin: [unknownGeneratorFull]});2978-execa('unicorns', {stdout: unknownGeneratorFull});2979-execaSync('unicorns', {stdout: unknownGeneratorFull});2980-execa('unicorns', {stdout: [unknownGeneratorFull]});2981-execaSync('unicorns', {stdout: [unknownGeneratorFull]});2982-execa('unicorns', {stderr: unknownGeneratorFull});2983-execaSync('unicorns', {stderr: unknownGeneratorFull});2984-execa('unicorns', {stderr: [unknownGeneratorFull]});2985-execaSync('unicorns', {stderr: [unknownGeneratorFull]});2986-expectError(execa('unicorns', {stdio: unknownGeneratorFull}));2987-expectError(execaSync('unicorns', {stdio: unknownGeneratorFull}));2988-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGeneratorFull]});2989-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownGeneratorFull]});2990-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGeneratorFull]]});2991-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownGeneratorFull]]});2992-expectAssignable<StdinOption>(unknownGeneratorFull);2993-expectAssignable<StdinOptionSync>(unknownGeneratorFull);2994-expectAssignable<StdinOption>([unknownGeneratorFull]);2995-expectAssignable<StdinOptionSync>([unknownGeneratorFull]);2996-expectAssignable<StdoutStderrOption>(unknownGeneratorFull);2997-expectAssignable<StdoutStderrOptionSync>(unknownGeneratorFull);2998-expectAssignable<StdoutStderrOption>([unknownGeneratorFull]);2999-expectAssignable<StdoutStderrOptionSync>([unknownGeneratorFull]);3000-expectAssignable<StdioOption>(unknownGeneratorFull);3001-expectAssignable<StdioOptionSync>(unknownGeneratorFull);3002-expectAssignable<StdioOption>([unknownGeneratorFull]);3003-expectAssignable<StdioOptionSync>([unknownGeneratorFull]);3004-execa('unicorns', {stdin: unknownFinalFull});3005-execaSync('unicorns', {stdin: unknownFinalFull});3006-execa('unicorns', {stdin: [unknownFinalFull]});3007-execaSync('unicorns', {stdin: [unknownFinalFull]});3008-execa('unicorns', {stdout: unknownFinalFull});3009-execaSync('unicorns', {stdout: unknownFinalFull});3010-execa('unicorns', {stdout: [unknownFinalFull]});3011-execaSync('unicorns', {stdout: [unknownFinalFull]});3012-execa('unicorns', {stderr: unknownFinalFull});3013-execaSync('unicorns', {stderr: unknownFinalFull});3014-execa('unicorns', {stderr: [unknownFinalFull]});3015-execaSync('unicorns', {stderr: [unknownFinalFull]});3016-expectError(execa('unicorns', {stdio: unknownFinalFull}));3017-expectError(execaSync('unicorns', {stdio: unknownFinalFull}));3018-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownFinalFull]});3019-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', unknownFinalFull]});3020-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownFinalFull]]});3021-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [unknownFinalFull]]});3022-expectAssignable<StdinOption>(unknownFinalFull);3023-expectAssignable<StdinOptionSync>(unknownFinalFull);3024-expectAssignable<StdinOption>([unknownFinalFull]);3025-expectAssignable<StdinOptionSync>([unknownFinalFull]);3026-expectAssignable<StdoutStderrOption>(unknownFinalFull);3027-expectAssignable<StdoutStderrOptionSync>(unknownFinalFull);3028-expectAssignable<StdoutStderrOption>([unknownFinalFull]);3029-expectAssignable<StdoutStderrOptionSync>([unknownFinalFull]);3030-expectAssignable<StdioOption>(unknownFinalFull);3031-expectAssignable<StdioOptionSync>(unknownFinalFull);3032-expectAssignable<StdioOption>([unknownFinalFull]);3033-expectAssignable<StdioOptionSync>([unknownFinalFull]);3034-execa('unicorns', {stdin: objectGenerator});3035-execaSync('unicorns', {stdin: objectGenerator});3036-execa('unicorns', {stdin: [objectGenerator]});3037-execaSync('unicorns', {stdin: [objectGenerator]});3038-execa('unicorns', {stdout: objectGenerator});3039-execaSync('unicorns', {stdout: objectGenerator});3040-execa('unicorns', {stdout: [objectGenerator]});3041-execaSync('unicorns', {stdout: [objectGenerator]});3042-execa('unicorns', {stderr: objectGenerator});3043-execaSync('unicorns', {stderr: objectGenerator});3044-execa('unicorns', {stderr: [objectGenerator]});3045-execaSync('unicorns', {stderr: [objectGenerator]});3046-expectError(execa('unicorns', {stdio: objectGenerator}));3047-expectError(execaSync('unicorns', {stdio: objectGenerator}));3048-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGenerator]});3049-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGenerator]});3050-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGenerator]]});3051-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGenerator]]});3052-expectAssignable<StdinOption>(objectGenerator);3053-expectAssignable<StdinOptionSync>(objectGenerator);3054-expectAssignable<StdinOption>([objectGenerator]);3055-expectAssignable<StdinOptionSync>([objectGenerator]);3056-expectAssignable<StdoutStderrOption>(objectGenerator);3057-expectAssignable<StdoutStderrOptionSync>(objectGenerator);3058-expectAssignable<StdoutStderrOption>([objectGenerator]);3059-expectAssignable<StdoutStderrOptionSync>([objectGenerator]);3060-expectAssignable<StdioOption>(objectGenerator);3061-expectAssignable<StdioOptionSync>(objectGenerator);3062-expectAssignable<StdioOption>([objectGenerator]);3063-expectAssignable<StdioOptionSync>([objectGenerator]);3064-execa('unicorns', {stdin: objectGeneratorFull});3065-execaSync('unicorns', {stdin: objectGeneratorFull});3066-execa('unicorns', {stdin: [objectGeneratorFull]});3067-execaSync('unicorns', {stdin: [objectGeneratorFull]});3068-execa('unicorns', {stdout: objectGeneratorFull});3069-execaSync('unicorns', {stdout: objectGeneratorFull});3070-execa('unicorns', {stdout: [objectGeneratorFull]});3071-execaSync('unicorns', {stdout: [objectGeneratorFull]});3072-execa('unicorns', {stderr: objectGeneratorFull});3073-execaSync('unicorns', {stderr: objectGeneratorFull});3074-execa('unicorns', {stderr: [objectGeneratorFull]});3075-execaSync('unicorns', {stderr: [objectGeneratorFull]});3076-expectError(execa('unicorns', {stdio: objectGeneratorFull}));3077-expectError(execaSync('unicorns', {stdio: objectGeneratorFull}));3078-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGeneratorFull]});3079-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectGeneratorFull]});3080-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGeneratorFull]]});3081-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectGeneratorFull]]});3082-expectAssignable<StdinOption>(objectGeneratorFull);3083-expectAssignable<StdinOptionSync>(objectGeneratorFull);3084-expectAssignable<StdinOption>([objectGeneratorFull]);3085-expectAssignable<StdinOptionSync>([objectGeneratorFull]);3086-expectAssignable<StdoutStderrOption>(objectGeneratorFull);3087-expectAssignable<StdoutStderrOptionSync>(objectGeneratorFull);3088-expectAssignable<StdoutStderrOption>([objectGeneratorFull]);3089-expectAssignable<StdoutStderrOptionSync>([objectGeneratorFull]);3090-expectAssignable<StdioOption>(objectGeneratorFull);3091-expectAssignable<StdioOptionSync>(objectGeneratorFull);3092-expectAssignable<StdioOption>([objectGeneratorFull]);3093-expectAssignable<StdioOptionSync>([objectGeneratorFull]);3094-execa('unicorns', {stdin: objectFinalFull});3095-execaSync('unicorns', {stdin: objectFinalFull});3096-execa('unicorns', {stdin: [objectFinalFull]});3097-execaSync('unicorns', {stdin: [objectFinalFull]});3098-execa('unicorns', {stdout: objectFinalFull});3099-execaSync('unicorns', {stdout: objectFinalFull});3100-execa('unicorns', {stdout: [objectFinalFull]});3101-execaSync('unicorns', {stdout: [objectFinalFull]});3102-execa('unicorns', {stderr: objectFinalFull});3103-execaSync('unicorns', {stderr: objectFinalFull});3104-execa('unicorns', {stderr: [objectFinalFull]});3105-execaSync('unicorns', {stderr: [objectFinalFull]});3106-expectError(execa('unicorns', {stdio: objectFinalFull}));3107-expectError(execaSync('unicorns', {stdio: objectFinalFull}));3108-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectFinalFull]});3109-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectFinalFull]});3110-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectFinalFull]]});3111-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectFinalFull]]});3112-expectAssignable<StdinOption>(objectFinalFull);3113-expectAssignable<StdinOptionSync>(objectFinalFull);3114-expectAssignable<StdinOption>([objectFinalFull]);3115-expectAssignable<StdinOptionSync>([objectFinalFull]);3116-expectAssignable<StdoutStderrOption>(objectFinalFull);3117-expectAssignable<StdoutStderrOptionSync>(objectFinalFull);3118-expectAssignable<StdoutStderrOption>([objectFinalFull]);3119-expectAssignable<StdoutStderrOptionSync>([objectFinalFull]);3120-expectAssignable<StdioOption>(objectFinalFull);3121-expectAssignable<StdioOptionSync>(objectFinalFull);3122-expectAssignable<StdioOption>([objectFinalFull]);3123-expectAssignable<StdioOptionSync>([objectFinalFull]);3124-expectError(execa('unicorns', {stdin: booleanGenerator}));3125-expectError(execaSync('unicorns', {stdin: booleanGenerator}));3126-expectError(execa('unicorns', {stdin: [booleanGenerator]}));3127-expectError(execaSync('unicorns', {stdin: [booleanGenerator]}));3128-expectError(execa('unicorns', {stdout: booleanGenerator}));3129-expectError(execaSync('unicorns', {stdout: booleanGenerator}));3130-expectError(execa('unicorns', {stdout: [booleanGenerator]}));3131-expectError(execaSync('unicorns', {stdout: [booleanGenerator]}));3132-expectError(execa('unicorns', {stderr: booleanGenerator}));3133-expectError(execaSync('unicorns', {stderr: booleanGenerator}));3134-expectError(execa('unicorns', {stderr: [booleanGenerator]}));3135-expectError(execaSync('unicorns', {stderr: [booleanGenerator]}));3136-expectError(execa('unicorns', {stdio: booleanGenerator}));3137-expectError(execaSync('unicorns', {stdio: booleanGenerator}));3138-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGenerator]}));3139-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGenerator]}));3140-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGenerator]]}));3141-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGenerator]]}));3142-expectNotAssignable<StdinOption>(booleanGenerator);3143-expectNotAssignable<StdinOptionSync>(booleanGenerator);3144-expectNotAssignable<StdinOption>([booleanGenerator]);3145-expectNotAssignable<StdinOptionSync>([booleanGenerator]);3146-expectNotAssignable<StdoutStderrOption>(booleanGenerator);3147-expectNotAssignable<StdoutStderrOptionSync>(booleanGenerator);3148-expectNotAssignable<StdoutStderrOption>([booleanGenerator]);3149-expectNotAssignable<StdoutStderrOptionSync>([booleanGenerator]);3150-expectNotAssignable<StdioOption>(booleanGenerator);3151-expectNotAssignable<StdioOptionSync>(booleanGenerator);3152-expectNotAssignable<StdioOption>([booleanGenerator]);3153-expectNotAssignable<StdioOptionSync>([booleanGenerator]);3154-expectError(execa('unicorns', {stdin: booleanGeneratorFull}));3155-expectError(execaSync('unicorns', {stdin: booleanGeneratorFull}));3156-expectError(execa('unicorns', {stdin: [booleanGeneratorFull]}));3157-expectError(execaSync('unicorns', {stdin: [booleanGeneratorFull]}));3158-expectError(execa('unicorns', {stdout: booleanGeneratorFull}));3159-expectError(execaSync('unicorns', {stdout: booleanGeneratorFull}));3160-expectError(execa('unicorns', {stdout: [booleanGeneratorFull]}));3161-expectError(execaSync('unicorns', {stdout: [booleanGeneratorFull]}));3162-expectError(execa('unicorns', {stderr: booleanGeneratorFull}));3163-expectError(execaSync('unicorns', {stderr: booleanGeneratorFull}));3164-expectError(execa('unicorns', {stderr: [booleanGeneratorFull]}));3165-expectError(execaSync('unicorns', {stderr: [booleanGeneratorFull]}));3166-expectError(execa('unicorns', {stdio: booleanGeneratorFull}));3167-expectError(execaSync('unicorns', {stdio: booleanGeneratorFull}));3168-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGeneratorFull]}));3169-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', booleanGeneratorFull]}));3170-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGeneratorFull]]}));3171-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [booleanGeneratorFull]]}));3172-expectNotAssignable<StdinOption>(booleanGeneratorFull);3173-expectNotAssignable<StdinOptionSync>(booleanGeneratorFull);3174-expectNotAssignable<StdinOption>([booleanGeneratorFull]);3175-expectNotAssignable<StdinOptionSync>([booleanGeneratorFull]);3176-expectNotAssignable<StdoutStderrOption>(booleanGeneratorFull);3177-expectNotAssignable<StdoutStderrOptionSync>(booleanGeneratorFull);3178-expectNotAssignable<StdoutStderrOption>([booleanGeneratorFull]);3179-expectNotAssignable<StdoutStderrOptionSync>([booleanGeneratorFull]);3180-expectNotAssignable<StdioOption>(booleanGeneratorFull);3181-expectNotAssignable<StdioOptionSync>(booleanGeneratorFull);3182-expectNotAssignable<StdioOption>([booleanGeneratorFull]);3183-expectNotAssignable<StdioOptionSync>([booleanGeneratorFull]);3184-expectError(execa('unicorns', {stdin: stringGenerator}));3185-expectError(execaSync('unicorns', {stdin: stringGenerator}));3186-expectError(execa('unicorns', {stdin: [stringGenerator]}));3187-expectError(execaSync('unicorns', {stdin: [stringGenerator]}));3188-expectError(execa('unicorns', {stdout: stringGenerator}));3189-expectError(execaSync('unicorns', {stdout: stringGenerator}));3190-expectError(execa('unicorns', {stdout: [stringGenerator]}));3191-expectError(execaSync('unicorns', {stdout: [stringGenerator]}));3192-expectError(execa('unicorns', {stderr: stringGenerator}));3193-expectError(execaSync('unicorns', {stderr: stringGenerator}));3194-expectError(execa('unicorns', {stderr: [stringGenerator]}));3195-expectError(execaSync('unicorns', {stderr: [stringGenerator]}));3196-expectError(execa('unicorns', {stdio: stringGenerator}));3197-expectError(execaSync('unicorns', {stdio: stringGenerator}));3198-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGenerator]}));3199-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGenerator]}));3200-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGenerator]]}));3201-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGenerator]]}));3202-expectNotAssignable<StdinOption>(stringGenerator);3203-expectNotAssignable<StdinOptionSync>(stringGenerator);3204-expectNotAssignable<StdinOption>([stringGenerator]);3205-expectNotAssignable<StdinOptionSync>([stringGenerator]);3206-expectNotAssignable<StdoutStderrOption>(stringGenerator);3207-expectNotAssignable<StdoutStderrOptionSync>(stringGenerator);3208-expectNotAssignable<StdoutStderrOption>([stringGenerator]);3209-expectNotAssignable<StdoutStderrOptionSync>([stringGenerator]);3210-expectNotAssignable<StdioOption>(stringGenerator);3211-expectNotAssignable<StdioOptionSync>(stringGenerator);3212-expectNotAssignable<StdioOption>([stringGenerator]);3213-expectNotAssignable<StdioOptionSync>([stringGenerator]);3214-expectError(execa('unicorns', {stdin: stringGeneratorFull}));3215-expectError(execaSync('unicorns', {stdin: stringGeneratorFull}));3216-expectError(execa('unicorns', {stdin: [stringGeneratorFull]}));3217-expectError(execaSync('unicorns', {stdin: [stringGeneratorFull]}));3218-expectError(execa('unicorns', {stdout: stringGeneratorFull}));3219-expectError(execaSync('unicorns', {stdout: stringGeneratorFull}));3220-expectError(execa('unicorns', {stdout: [stringGeneratorFull]}));3221-expectError(execaSync('unicorns', {stdout: [stringGeneratorFull]}));3222-expectError(execa('unicorns', {stderr: stringGeneratorFull}));3223-expectError(execaSync('unicorns', {stderr: stringGeneratorFull}));3224-expectError(execa('unicorns', {stderr: [stringGeneratorFull]}));3225-expectError(execaSync('unicorns', {stderr: [stringGeneratorFull]}));3226-expectError(execa('unicorns', {stdio: stringGeneratorFull}));3227-expectError(execaSync('unicorns', {stdio: stringGeneratorFull}));3228-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGeneratorFull]}));3229-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', stringGeneratorFull]}));3230-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGeneratorFull]]}));3231-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [stringGeneratorFull]]}));3232-expectNotAssignable<StdinOption>(stringGeneratorFull);3233-expectNotAssignable<StdinOptionSync>(stringGeneratorFull);3234-expectNotAssignable<StdinOption>([stringGeneratorFull]);3235-expectNotAssignable<StdinOptionSync>([stringGeneratorFull]);3236-expectNotAssignable<StdoutStderrOption>(stringGeneratorFull);3237-expectNotAssignable<StdoutStderrOptionSync>(stringGeneratorFull);3238-expectNotAssignable<StdoutStderrOption>([stringGeneratorFull]);3239-expectNotAssignable<StdoutStderrOptionSync>([stringGeneratorFull]);3240-expectNotAssignable<StdioOption>(stringGeneratorFull);3241-expectNotAssignable<StdioOptionSync>(stringGeneratorFull);3242-expectNotAssignable<StdioOption>([stringGeneratorFull]);3243-expectNotAssignable<StdioOptionSync>([stringGeneratorFull]);3244-expectError(execa('unicorns', {stdin: invalidReturnGenerator}));3245-expectError(execaSync('unicorns', {stdin: invalidReturnGenerator}));3246-expectError(execa('unicorns', {stdin: [invalidReturnGenerator]}));3247-expectError(execaSync('unicorns', {stdin: [invalidReturnGenerator]}));3248-expectError(execa('unicorns', {stdout: invalidReturnGenerator}));3249-expectError(execaSync('unicorns', {stdout: invalidReturnGenerator}));3250-expectError(execa('unicorns', {stdout: [invalidReturnGenerator]}));3251-expectError(execaSync('unicorns', {stdout: [invalidReturnGenerator]}));3252-expectError(execa('unicorns', {stderr: invalidReturnGenerator}));3253-expectError(execaSync('unicorns', {stderr: invalidReturnGenerator}));3254-expectError(execa('unicorns', {stderr: [invalidReturnGenerator]}));3255-expectError(execaSync('unicorns', {stderr: [invalidReturnGenerator]}));3256-expectError(execa('unicorns', {stdio: invalidReturnGenerator}));3257-expectError(execaSync('unicorns', {stdio: invalidReturnGenerator}));3258-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGenerator]}));3259-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGenerator]}));3260-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGenerator]]}));3261-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGenerator]]}));3262-expectNotAssignable<StdinOption>(invalidReturnGenerator);3263-expectNotAssignable<StdinOptionSync>(invalidReturnGenerator);3264-expectNotAssignable<StdinOption>([invalidReturnGenerator]);3265-expectNotAssignable<StdinOptionSync>([invalidReturnGenerator]);3266-expectNotAssignable<StdoutStderrOption>(invalidReturnGenerator);3267-expectNotAssignable<StdoutStderrOptionSync>(invalidReturnGenerator);3268-expectNotAssignable<StdoutStderrOption>([invalidReturnGenerator]);3269-expectNotAssignable<StdoutStderrOptionSync>([invalidReturnGenerator]);3270-expectNotAssignable<StdioOption>(invalidReturnGenerator);3271-expectNotAssignable<StdioOptionSync>(invalidReturnGenerator);3272-expectNotAssignable<StdioOption>([invalidReturnGenerator]);3273-expectNotAssignable<StdioOptionSync>([invalidReturnGenerator]);3274-expectError(execa('unicorns', {stdin: invalidReturnGeneratorFull}));3275-expectError(execaSync('unicorns', {stdin: invalidReturnGeneratorFull}));3276-expectError(execa('unicorns', {stdin: [invalidReturnGeneratorFull]}));3277-expectError(execaSync('unicorns', {stdin: [invalidReturnGeneratorFull]}));3278-expectError(execa('unicorns', {stdout: invalidReturnGeneratorFull}));3279-expectError(execaSync('unicorns', {stdout: invalidReturnGeneratorFull}));3280-expectError(execa('unicorns', {stdout: [invalidReturnGeneratorFull]}));3281-expectError(execaSync('unicorns', {stdout: [invalidReturnGeneratorFull]}));3282-expectError(execa('unicorns', {stderr: invalidReturnGeneratorFull}));3283-expectError(execaSync('unicorns', {stderr: invalidReturnGeneratorFull}));3284-expectError(execa('unicorns', {stderr: [invalidReturnGeneratorFull]}));3285-expectError(execaSync('unicorns', {stderr: [invalidReturnGeneratorFull]}));3286-expectError(execa('unicorns', {stdio: invalidReturnGeneratorFull}));3287-expectError(execaSync('unicorns', {stdio: invalidReturnGeneratorFull}));3288-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGeneratorFull]}));3289-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnGeneratorFull]}));3290-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGeneratorFull]]}));3291-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnGeneratorFull]]}));3292-expectNotAssignable<StdinOption>(invalidReturnGeneratorFull);3293-expectNotAssignable<StdinOptionSync>(invalidReturnGeneratorFull);3294-expectNotAssignable<StdinOption>([invalidReturnGeneratorFull]);3295-expectNotAssignable<StdinOptionSync>([invalidReturnGeneratorFull]);3296-expectNotAssignable<StdoutStderrOption>(invalidReturnGeneratorFull);3297-expectNotAssignable<StdoutStderrOptionSync>(invalidReturnGeneratorFull);3298-expectNotAssignable<StdoutStderrOption>([invalidReturnGeneratorFull]);3299-expectNotAssignable<StdoutStderrOptionSync>([invalidReturnGeneratorFull]);3300-expectNotAssignable<StdioOption>(invalidReturnGeneratorFull);3301-expectNotAssignable<StdioOptionSync>(invalidReturnGeneratorFull);3302-expectNotAssignable<StdioOption>([invalidReturnGeneratorFull]);3303-expectNotAssignable<StdioOptionSync>([invalidReturnGeneratorFull]);3304-execa('unicorns', {stdin: asyncGenerator});3305-expectError(execaSync('unicorns', {stdin: asyncGenerator}));3306-execa('unicorns', {stdin: [asyncGenerator]});3307-expectError(execaSync('unicorns', {stdin: [asyncGenerator]}));3308-execa('unicorns', {stdout: asyncGenerator});3309-expectError(execaSync('unicorns', {stdout: asyncGenerator}));3310-execa('unicorns', {stdout: [asyncGenerator]});3311-expectError(execaSync('unicorns', {stdout: [asyncGenerator]}));3312-execa('unicorns', {stderr: asyncGenerator});3313-expectError(execaSync('unicorns', {stderr: asyncGenerator}));3314-execa('unicorns', {stderr: [asyncGenerator]});3315-expectError(execaSync('unicorns', {stderr: [asyncGenerator]}));3316-expectError(execa('unicorns', {stdio: asyncGenerator}));3317-expectError(execaSync('unicorns', {stdio: asyncGenerator}));3318-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGenerator]});3319-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGenerator]}));3320-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGenerator]]});3321-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGenerator]]}));3322-expectAssignable<StdinOption>(asyncGenerator);3323-expectNotAssignable<StdinOptionSync>(asyncGenerator);3324-expectAssignable<StdinOption>([asyncGenerator]);3325-expectNotAssignable<StdinOptionSync>([asyncGenerator]);3326-expectAssignable<StdoutStderrOption>(asyncGenerator);3327-expectNotAssignable<StdoutStderrOptionSync>(asyncGenerator);3328-expectAssignable<StdoutStderrOption>([asyncGenerator]);3329-expectNotAssignable<StdoutStderrOptionSync>([asyncGenerator]);3330-expectAssignable<StdioOption>(asyncGenerator);3331-expectNotAssignable<StdioOptionSync>(asyncGenerator);3332-expectAssignable<StdioOption>([asyncGenerator]);3333-expectNotAssignable<StdioOptionSync>([asyncGenerator]);3334-execa('unicorns', {stdin: asyncGeneratorFull});3335-expectError(execaSync('unicorns', {stdin: asyncGeneratorFull}));3336-execa('unicorns', {stdin: [asyncGeneratorFull]});3337-expectError(execaSync('unicorns', {stdin: [asyncGeneratorFull]}));3338-execa('unicorns', {stdout: asyncGeneratorFull});3339-expectError(execaSync('unicorns', {stdout: asyncGeneratorFull}));3340-execa('unicorns', {stdout: [asyncGeneratorFull]});3341-expectError(execaSync('unicorns', {stdout: [asyncGeneratorFull]}));3342-execa('unicorns', {stderr: asyncGeneratorFull});3343-expectError(execaSync('unicorns', {stderr: asyncGeneratorFull}));3344-execa('unicorns', {stderr: [asyncGeneratorFull]});3345-expectError(execaSync('unicorns', {stderr: [asyncGeneratorFull]}));3346-expectError(execa('unicorns', {stdio: asyncGeneratorFull}));3347-expectError(execaSync('unicorns', {stdio: asyncGeneratorFull}));3348-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGeneratorFull]});3349-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncGeneratorFull]}));3350-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGeneratorFull]]});3351-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncGeneratorFull]]}));3352-expectAssignable<StdinOption>(asyncGeneratorFull);3353-expectNotAssignable<StdinOptionSync>(asyncGeneratorFull);3354-expectAssignable<StdinOption>([asyncGeneratorFull]);3355-expectNotAssignable<StdinOptionSync>([asyncGeneratorFull]);3356-expectAssignable<StdoutStderrOption>(asyncGeneratorFull);3357-expectNotAssignable<StdoutStderrOptionSync>(asyncGeneratorFull);3358-expectAssignable<StdoutStderrOption>([asyncGeneratorFull]);3359-expectNotAssignable<StdoutStderrOptionSync>([asyncGeneratorFull]);3360-expectAssignable<StdioOption>(asyncGeneratorFull);3361-expectNotAssignable<StdioOptionSync>(asyncGeneratorFull);3362-expectAssignable<StdioOption>([asyncGeneratorFull]);3363-expectNotAssignable<StdioOptionSync>([asyncGeneratorFull]);3364-execa('unicorns', {stdin: asyncFinalFull});3365-expectError(execaSync('unicorns', {stdin: asyncFinalFull}));3366-execa('unicorns', {stdin: [asyncFinalFull]});3367-expectError(execaSync('unicorns', {stdin: [asyncFinalFull]}));3368-execa('unicorns', {stdout: asyncFinalFull});3369-expectError(execaSync('unicorns', {stdout: asyncFinalFull}));3370-execa('unicorns', {stdout: [asyncFinalFull]});3371-expectError(execaSync('unicorns', {stdout: [asyncFinalFull]}));3372-execa('unicorns', {stderr: asyncFinalFull});3373-expectError(execaSync('unicorns', {stderr: asyncFinalFull}));3374-execa('unicorns', {stderr: [asyncFinalFull]});3375-expectError(execaSync('unicorns', {stderr: [asyncFinalFull]}));3376-expectError(execa('unicorns', {stdio: asyncFinalFull}));3377-expectError(execaSync('unicorns', {stdio: asyncFinalFull}));3378-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncFinalFull]});3379-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', asyncFinalFull]}));3380-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncFinalFull]]});3381-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [asyncFinalFull]]}));3382-expectAssignable<StdinOption>(asyncFinalFull);3383-expectNotAssignable<StdinOptionSync>(asyncFinalFull);3384-expectAssignable<StdinOption>([asyncFinalFull]);3385-expectNotAssignable<StdinOptionSync>([asyncFinalFull]);3386-expectAssignable<StdoutStderrOption>(asyncFinalFull);3387-expectNotAssignable<StdoutStderrOptionSync>(asyncFinalFull);3388-expectAssignable<StdoutStderrOption>([asyncFinalFull]);3389-expectNotAssignable<StdoutStderrOptionSync>([asyncFinalFull]);3390-expectAssignable<StdioOption>(asyncFinalFull);3391-expectNotAssignable<StdioOptionSync>(asyncFinalFull);3392-expectAssignable<StdioOption>([asyncFinalFull]);3393-expectNotAssignable<StdioOptionSync>([asyncFinalFull]);3394-expectError(execa('unicorns', {stdin: invalidReturnFinalFull}));3395-expectError(execaSync('unicorns', {stdin: invalidReturnFinalFull}));3396-expectError(execa('unicorns', {stdin: [invalidReturnFinalFull]}));3397-expectError(execaSync('unicorns', {stdin: [invalidReturnFinalFull]}));3398-expectError(execa('unicorns', {stdout: invalidReturnFinalFull}));3399-expectError(execaSync('unicorns', {stdout: invalidReturnFinalFull}));3400-expectError(execa('unicorns', {stdout: [invalidReturnFinalFull]}));3401-expectError(execaSync('unicorns', {stdout: [invalidReturnFinalFull]}));3402-expectError(execa('unicorns', {stderr: invalidReturnFinalFull}));3403-expectError(execaSync('unicorns', {stderr: invalidReturnFinalFull}));3404-expectError(execa('unicorns', {stderr: [invalidReturnFinalFull]}));3405-expectError(execaSync('unicorns', {stderr: [invalidReturnFinalFull]}));3406-expectError(execa('unicorns', {stdio: invalidReturnFinalFull}));3407-expectError(execaSync('unicorns', {stdio: invalidReturnFinalFull}));3408-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnFinalFull]}));3409-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', invalidReturnFinalFull]}));3410-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnFinalFull]]}));3411-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [invalidReturnFinalFull]]}));3412-expectNotAssignable<StdinOption>(invalidReturnFinalFull);3413-expectNotAssignable<StdinOptionSync>(invalidReturnFinalFull);3414-expectNotAssignable<StdinOption>([invalidReturnFinalFull]);3415-expectNotAssignable<StdinOptionSync>([invalidReturnFinalFull]);3416-expectNotAssignable<StdoutStderrOption>(invalidReturnFinalFull);3417-expectNotAssignable<StdoutStderrOptionSync>(invalidReturnFinalFull);3418-expectNotAssignable<StdoutStderrOption>([invalidReturnFinalFull]);3419-expectNotAssignable<StdoutStderrOptionSync>([invalidReturnFinalFull]);3420-expectNotAssignable<StdioOption>(invalidReturnFinalFull);3421-expectNotAssignable<StdioOptionSync>(invalidReturnFinalFull);3422-expectNotAssignable<StdioOption>([invalidReturnFinalFull]);3423-expectNotAssignable<StdioOptionSync>([invalidReturnFinalFull]);3424-execa('unicorns', {stdin: transformWithBinary});3425-execaSync('unicorns', {stdin: transformWithBinary});3426-execa('unicorns', {stdin: [transformWithBinary]});3427-execaSync('unicorns', {stdin: [transformWithBinary]});3428-execa('unicorns', {stdout: transformWithBinary});3429-execaSync('unicorns', {stdout: transformWithBinary});3430-execa('unicorns', {stdout: [transformWithBinary]});3431-execaSync('unicorns', {stdout: [transformWithBinary]});3432-execa('unicorns', {stderr: transformWithBinary});3433-execaSync('unicorns', {stderr: transformWithBinary});3434-execa('unicorns', {stderr: [transformWithBinary]});3435-execaSync('unicorns', {stderr: [transformWithBinary]});3436-expectError(execa('unicorns', {stdio: transformWithBinary}));3437-expectError(execaSync('unicorns', {stdio: transformWithBinary}));3438-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithBinary]});3439-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithBinary]});3440-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithBinary]]});3441-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithBinary]]});3442-expectAssignable<StdinOption>(transformWithBinary);3443-expectAssignable<StdinOptionSync>(transformWithBinary);3444-expectAssignable<StdinOption>([transformWithBinary]);3445-expectAssignable<StdinOptionSync>([transformWithBinary]);3446-expectAssignable<StdoutStderrOption>(transformWithBinary);3447-expectAssignable<StdoutStderrOptionSync>(transformWithBinary);3448-expectAssignable<StdoutStderrOption>([transformWithBinary]);3449-expectAssignable<StdoutStderrOptionSync>([transformWithBinary]);3450-expectAssignable<StdioOption>(transformWithBinary);3451-expectAssignable<StdioOptionSync>(transformWithBinary);3452-expectAssignable<StdioOption>([transformWithBinary]);3453-expectAssignable<StdioOptionSync>([transformWithBinary]);3454-expectError(execa('unicorns', {stdin: transformWithInvalidBinary}));3455-expectError(execaSync('unicorns', {stdin: transformWithInvalidBinary}));3456-expectError(execa('unicorns', {stdin: [transformWithInvalidBinary]}));3457-expectError(execaSync('unicorns', {stdin: [transformWithInvalidBinary]}));3458-expectError(execa('unicorns', {stdout: transformWithInvalidBinary}));3459-expectError(execaSync('unicorns', {stdout: transformWithInvalidBinary}));3460-expectError(execa('unicorns', {stdout: [transformWithInvalidBinary]}));3461-expectError(execaSync('unicorns', {stdout: [transformWithInvalidBinary]}));3462-expectError(execa('unicorns', {stderr: transformWithInvalidBinary}));3463-expectError(execaSync('unicorns', {stderr: transformWithInvalidBinary}));3464-expectError(execa('unicorns', {stderr: [transformWithInvalidBinary]}));3465-expectError(execaSync('unicorns', {stderr: [transformWithInvalidBinary]}));3466-expectError(execa('unicorns', {stdio: transformWithInvalidBinary}));3467-expectError(execaSync('unicorns', {stdio: transformWithInvalidBinary}));3468-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidBinary]}));3469-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidBinary]}));3470-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidBinary]]}));3471-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidBinary]]}));3472-expectNotAssignable<StdinOption>(transformWithInvalidBinary);3473-expectNotAssignable<StdinOptionSync>(transformWithInvalidBinary);3474-expectNotAssignable<StdinOption>([transformWithInvalidBinary]);3475-expectNotAssignable<StdinOptionSync>([transformWithInvalidBinary]);3476-expectNotAssignable<StdoutStderrOption>(transformWithInvalidBinary);3477-expectNotAssignable<StdoutStderrOptionSync>(transformWithInvalidBinary);3478-expectNotAssignable<StdoutStderrOption>([transformWithInvalidBinary]);3479-expectNotAssignable<StdoutStderrOptionSync>([transformWithInvalidBinary]);3480-expectNotAssignable<StdioOption>(transformWithInvalidBinary);3481-expectNotAssignable<StdioOptionSync>(transformWithInvalidBinary);3482-expectNotAssignable<StdioOption>([transformWithInvalidBinary]);3483-expectNotAssignable<StdioOptionSync>([transformWithInvalidBinary]);3484-execa('unicorns', {stdin: transformWithPreserveNewlines});3485-execaSync('unicorns', {stdin: transformWithPreserveNewlines});3486-execa('unicorns', {stdin: [transformWithPreserveNewlines]});3487-execaSync('unicorns', {stdin: [transformWithPreserveNewlines]});3488-execa('unicorns', {stdout: transformWithPreserveNewlines});3489-execaSync('unicorns', {stdout: transformWithPreserveNewlines});3490-execa('unicorns', {stdout: [transformWithPreserveNewlines]});3491-execaSync('unicorns', {stdout: [transformWithPreserveNewlines]});3492-execa('unicorns', {stderr: transformWithPreserveNewlines});3493-execaSync('unicorns', {stderr: transformWithPreserveNewlines});3494-execa('unicorns', {stderr: [transformWithPreserveNewlines]});3495-execaSync('unicorns', {stderr: [transformWithPreserveNewlines]});3496-expectError(execa('unicorns', {stdio: transformWithPreserveNewlines}));3497-expectError(execaSync('unicorns', {stdio: transformWithPreserveNewlines}));3498-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithPreserveNewlines]});3499-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithPreserveNewlines]});3500-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithPreserveNewlines]]});3501-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithPreserveNewlines]]});3502-expectAssignable<StdinOption>(transformWithPreserveNewlines);3503-expectAssignable<StdinOptionSync>(transformWithPreserveNewlines);3504-expectAssignable<StdinOption>([transformWithPreserveNewlines]);3505-expectAssignable<StdinOptionSync>([transformWithPreserveNewlines]);3506-expectAssignable<StdoutStderrOption>(transformWithPreserveNewlines);3507-expectAssignable<StdoutStderrOptionSync>(transformWithPreserveNewlines);3508-expectAssignable<StdoutStderrOption>([transformWithPreserveNewlines]);3509-expectAssignable<StdoutStderrOptionSync>([transformWithPreserveNewlines]);3510-expectAssignable<StdioOption>(transformWithPreserveNewlines);3511-expectAssignable<StdioOptionSync>(transformWithPreserveNewlines);3512-expectAssignable<StdioOption>([transformWithPreserveNewlines]);3513-expectAssignable<StdioOptionSync>([transformWithPreserveNewlines]);3514-expectError(execa('unicorns', {stdin: transformWithInvalidPreserveNewlines}));3515-expectError(execaSync('unicorns', {stdin: transformWithInvalidPreserveNewlines}));3516-expectError(execa('unicorns', {stdin: [transformWithInvalidPreserveNewlines]}));3517-expectError(execaSync('unicorns', {stdin: [transformWithInvalidPreserveNewlines]}));3518-expectError(execa('unicorns', {stdout: transformWithInvalidPreserveNewlines}));3519-expectError(execaSync('unicorns', {stdout: transformWithInvalidPreserveNewlines}));3520-expectError(execa('unicorns', {stdout: [transformWithInvalidPreserveNewlines]}));3521-expectError(execaSync('unicorns', {stdout: [transformWithInvalidPreserveNewlines]}));3522-expectError(execa('unicorns', {stderr: transformWithInvalidPreserveNewlines}));3523-expectError(execaSync('unicorns', {stderr: transformWithInvalidPreserveNewlines}));3524-expectError(execa('unicorns', {stderr: [transformWithInvalidPreserveNewlines]}));3525-expectError(execaSync('unicorns', {stderr: [transformWithInvalidPreserveNewlines]}));3526-expectError(execa('unicorns', {stdio: transformWithInvalidPreserveNewlines}));3527-expectError(execaSync('unicorns', {stdio: transformWithInvalidPreserveNewlines}));3528-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidPreserveNewlines]}));3529-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidPreserveNewlines]}));3530-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidPreserveNewlines]]}));3531-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidPreserveNewlines]]}));3532-expectNotAssignable<StdinOption>(transformWithInvalidPreserveNewlines);3533-expectNotAssignable<StdinOptionSync>(transformWithInvalidPreserveNewlines);3534-expectNotAssignable<StdinOption>([transformWithInvalidPreserveNewlines]);3535-expectNotAssignable<StdinOptionSync>([transformWithInvalidPreserveNewlines]);3536-expectNotAssignable<StdoutStderrOption>(transformWithInvalidPreserveNewlines);3537-expectNotAssignable<StdoutStderrOptionSync>(transformWithInvalidPreserveNewlines);3538-expectNotAssignable<StdoutStderrOption>([transformWithInvalidPreserveNewlines]);3539-expectNotAssignable<StdoutStderrOptionSync>([transformWithInvalidPreserveNewlines]);3540-expectNotAssignable<StdioOption>(transformWithInvalidPreserveNewlines);3541-expectNotAssignable<StdioOptionSync>(transformWithInvalidPreserveNewlines);3542-expectNotAssignable<StdioOption>([transformWithInvalidPreserveNewlines]);3543-expectNotAssignable<StdioOptionSync>([transformWithInvalidPreserveNewlines]);3544-execa('unicorns', {stdin: transformWithObjectMode});3545-execaSync('unicorns', {stdin: transformWithObjectMode});3546-execa('unicorns', {stdin: [transformWithObjectMode]});3547-execaSync('unicorns', {stdin: [transformWithObjectMode]});3548-execa('unicorns', {stdout: transformWithObjectMode});3549-execaSync('unicorns', {stdout: transformWithObjectMode});3550-execa('unicorns', {stdout: [transformWithObjectMode]});3551-execaSync('unicorns', {stdout: [transformWithObjectMode]});3552-execa('unicorns', {stderr: transformWithObjectMode});3553-execaSync('unicorns', {stderr: transformWithObjectMode});3554-execa('unicorns', {stderr: [transformWithObjectMode]});3555-execaSync('unicorns', {stderr: [transformWithObjectMode]});3556-expectError(execa('unicorns', {stdio: transformWithObjectMode}));3557-expectError(execaSync('unicorns', {stdio: transformWithObjectMode}));3558-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithObjectMode]});3559-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithObjectMode]});3560-execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithObjectMode]]});3561-execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithObjectMode]]});3562-expectAssignable<StdinOption>(transformWithObjectMode);3563-expectAssignable<StdinOptionSync>(transformWithObjectMode);3564-expectAssignable<StdinOption>([transformWithObjectMode]);3565-expectAssignable<StdinOptionSync>([transformWithObjectMode]);3566-expectAssignable<StdoutStderrOption>(transformWithObjectMode);3567-expectAssignable<StdoutStderrOptionSync>(transformWithObjectMode);3568-expectAssignable<StdoutStderrOption>([transformWithObjectMode]);3569-expectAssignable<StdoutStderrOptionSync>([transformWithObjectMode]);3570-expectAssignable<StdioOption>(transformWithObjectMode);3571-expectAssignable<StdioOptionSync>(transformWithObjectMode);3572-expectAssignable<StdioOption>([transformWithObjectMode]);3573-expectAssignable<StdioOptionSync>([transformWithObjectMode]);3574-expectError(execa('unicorns', {stdin: transformWithInvalidObjectMode}));3575-expectError(execaSync('unicorns', {stdin: transformWithInvalidObjectMode}));3576-expectError(execa('unicorns', {stdin: [transformWithInvalidObjectMode]}));3577-expectError(execaSync('unicorns', {stdin: [transformWithInvalidObjectMode]}));3578-expectError(execa('unicorns', {stdout: transformWithInvalidObjectMode}));3579-expectError(execaSync('unicorns', {stdout: transformWithInvalidObjectMode}));3580-expectError(execa('unicorns', {stdout: [transformWithInvalidObjectMode]}));3581-expectError(execaSync('unicorns', {stdout: [transformWithInvalidObjectMode]}));3582-expectError(execa('unicorns', {stderr: transformWithInvalidObjectMode}));3583-expectError(execaSync('unicorns', {stderr: transformWithInvalidObjectMode}));3584-expectError(execa('unicorns', {stderr: [transformWithInvalidObjectMode]}));3585-expectError(execaSync('unicorns', {stderr: [transformWithInvalidObjectMode]}));3586-expectError(execa('unicorns', {stdio: transformWithInvalidObjectMode}));3587-expectError(execaSync('unicorns', {stdio: transformWithInvalidObjectMode}));3588-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidObjectMode]}));3589-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', transformWithInvalidObjectMode]}));3590-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidObjectMode]]}));3591-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [transformWithInvalidObjectMode]]}));3592-expectNotAssignable<StdinOption>(transformWithInvalidObjectMode);3593-expectNotAssignable<StdinOptionSync>(transformWithInvalidObjectMode);3594-expectNotAssignable<StdinOption>([transformWithInvalidObjectMode]);3595-expectNotAssignable<StdinOptionSync>([transformWithInvalidObjectMode]);3596-expectNotAssignable<StdoutStderrOption>(transformWithInvalidObjectMode);3597-expectNotAssignable<StdoutStderrOptionSync>(transformWithInvalidObjectMode);3598-expectNotAssignable<StdoutStderrOption>([transformWithInvalidObjectMode]);3599-expectNotAssignable<StdoutStderrOptionSync>([transformWithInvalidObjectMode]);3600-expectNotAssignable<StdioOption>(transformWithInvalidObjectMode);3601-expectNotAssignable<StdioOptionSync>(transformWithInvalidObjectMode);3602-expectNotAssignable<StdioOption>([transformWithInvalidObjectMode]);3603-expectNotAssignable<StdioOptionSync>([transformWithInvalidObjectMode]);3604-expectError(execa('unicorns', {stdin: {}}));3605-expectError(execaSync('unicorns', {stdin: {}}));3606-expectError(execa('unicorns', {stdin: [{}]}));3607-expectError(execaSync('unicorns', {stdin: [{}]}));3608-expectError(execa('unicorns', {stdout: {}}));3609-expectError(execaSync('unicorns', {stdout: {}}));3610-expectError(execa('unicorns', {stdout: [{}]}));3611-expectError(execaSync('unicorns', {stdout: [{}]}));3612-expectError(execa('unicorns', {stderr: {}}));3613-expectError(execaSync('unicorns', {stderr: {}}));3614-expectError(execa('unicorns', {stderr: [{}]}));3615-expectError(execaSync('unicorns', {stderr: [{}]}));3616-expectError(execa('unicorns', {stdio: {}}));3617-expectError(execaSync('unicorns', {stdio: {}}));3618-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {}]}));3619-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', {}]}));3620-expectNotAssignable<StdinOption>({});3621-expectNotAssignable<StdinOptionSync>({});3622-expectNotAssignable<StdinOption>([{}]);3623-expectNotAssignable<StdinOptionSync>([{}]);3624-expectNotAssignable<StdoutStderrOption>({});3625-expectNotAssignable<StdoutStderrOptionSync>({});3626-expectNotAssignable<StdoutStderrOption>([{}]);3627-expectNotAssignable<StdoutStderrOptionSync>([{}]);3628-expectNotAssignable<StdioOption>({});3629-expectNotAssignable<StdioOptionSync>({});3630-expectNotAssignable<StdioOption>([{}]);3631-expectNotAssignable<StdioOptionSync>([{}]);3632-expectError(execa('unicorns', {stdin: binaryOnly}));3633-expectError(execaSync('unicorns', {stdin: binaryOnly}));3634-expectError(execa('unicorns', {stdin: [binaryOnly]}));3635-expectError(execaSync('unicorns', {stdin: [binaryOnly]}));3636-expectError(execa('unicorns', {stdout: binaryOnly}));3637-expectError(execaSync('unicorns', {stdout: binaryOnly}));3638-expectError(execa('unicorns', {stdout: [binaryOnly]}));3639-expectError(execaSync('unicorns', {stdout: [binaryOnly]}));3640-expectError(execa('unicorns', {stderr: binaryOnly}));3641-expectError(execaSync('unicorns', {stderr: binaryOnly}));3642-expectError(execa('unicorns', {stderr: [binaryOnly]}));3643-expectError(execaSync('unicorns', {stderr: [binaryOnly]}));3644-expectError(execa('unicorns', {stdio: binaryOnly}));3645-expectError(execaSync('unicorns', {stdio: binaryOnly}));3646-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryOnly]}));3647-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', binaryOnly]}));3648-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryOnly]]}));3649-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [binaryOnly]]}));3650-expectNotAssignable<StdinOption>(binaryOnly);3651-expectNotAssignable<StdinOptionSync>(binaryOnly);3652-expectNotAssignable<StdinOption>([binaryOnly]);3653-expectNotAssignable<StdinOptionSync>([binaryOnly]);3654-expectNotAssignable<StdoutStderrOption>(binaryOnly);3655-expectNotAssignable<StdoutStderrOptionSync>(binaryOnly);3656-expectNotAssignable<StdoutStderrOption>([binaryOnly]);3657-expectNotAssignable<StdoutStderrOptionSync>([binaryOnly]);3658-expectNotAssignable<StdioOption>(binaryOnly);3659-expectNotAssignable<StdioOptionSync>(binaryOnly);3660-expectNotAssignable<StdioOption>([binaryOnly]);3661-expectNotAssignable<StdioOptionSync>([binaryOnly]);3662-expectError(execa('unicorns', {stdin: preserveNewlinesOnly}));3663-expectError(execaSync('unicorns', {stdin: preserveNewlinesOnly}));3664-expectError(execa('unicorns', {stdin: [preserveNewlinesOnly]}));3665-expectError(execaSync('unicorns', {stdin: [preserveNewlinesOnly]}));3666-expectError(execa('unicorns', {stdout: preserveNewlinesOnly}));3667-expectError(execaSync('unicorns', {stdout: preserveNewlinesOnly}));3668-expectError(execa('unicorns', {stdout: [preserveNewlinesOnly]}));3669-expectError(execaSync('unicorns', {stdout: [preserveNewlinesOnly]}));3670-expectError(execa('unicorns', {stderr: preserveNewlinesOnly}));3671-expectError(execaSync('unicorns', {stderr: preserveNewlinesOnly}));3672-expectError(execa('unicorns', {stderr: [preserveNewlinesOnly]}));3673-expectError(execaSync('unicorns', {stderr: [preserveNewlinesOnly]}));3674-expectError(execa('unicorns', {stdio: preserveNewlinesOnly}));3675-expectError(execaSync('unicorns', {stdio: preserveNewlinesOnly}));3676-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', preserveNewlinesOnly]}));3677-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', preserveNewlinesOnly]}));3678-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [preserveNewlinesOnly]]}));3679-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [preserveNewlinesOnly]]}));3680-expectNotAssignable<StdinOption>(preserveNewlinesOnly);3681-expectNotAssignable<StdinOptionSync>(preserveNewlinesOnly);3682-expectNotAssignable<StdinOption>([preserveNewlinesOnly]);3683-expectNotAssignable<StdinOptionSync>([preserveNewlinesOnly]);3684-expectNotAssignable<StdoutStderrOption>(preserveNewlinesOnly);3685-expectNotAssignable<StdoutStderrOptionSync>(preserveNewlinesOnly);3686-expectNotAssignable<StdoutStderrOption>([preserveNewlinesOnly]);3687-expectNotAssignable<StdoutStderrOptionSync>([preserveNewlinesOnly]);3688-expectNotAssignable<StdioOption>(preserveNewlinesOnly);3689-expectNotAssignable<StdioOptionSync>(preserveNewlinesOnly);3690-expectNotAssignable<StdioOption>([preserveNewlinesOnly]);3691-expectNotAssignable<StdioOptionSync>([preserveNewlinesOnly]);3692-expectError(execa('unicorns', {stdin: objectModeOnly}));3693-expectError(execaSync('unicorns', {stdin: objectModeOnly}));3694-expectError(execa('unicorns', {stdin: [objectModeOnly]}));3695-expectError(execaSync('unicorns', {stdin: [objectModeOnly]}));3696-expectError(execa('unicorns', {stdout: objectModeOnly}));3697-expectError(execaSync('unicorns', {stdout: objectModeOnly}));3698-expectError(execa('unicorns', {stdout: [objectModeOnly]}));3699-expectError(execaSync('unicorns', {stdout: [objectModeOnly]}));3700-expectError(execa('unicorns', {stderr: objectModeOnly}));3701-expectError(execaSync('unicorns', {stderr: objectModeOnly}));3702-expectError(execa('unicorns', {stderr: [objectModeOnly]}));3703-expectError(execaSync('unicorns', {stderr: [objectModeOnly]}));3704-expectError(execa('unicorns', {stdio: objectModeOnly}));3705-expectError(execaSync('unicorns', {stdio: objectModeOnly}));3706-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectModeOnly]}));3707-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', objectModeOnly]}));3708-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectModeOnly]]}));3709-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [objectModeOnly]]}));3710-expectNotAssignable<StdinOption>(objectModeOnly);3711-expectNotAssignable<StdinOptionSync>(objectModeOnly);3712-expectNotAssignable<StdinOption>([objectModeOnly]);3713-expectNotAssignable<StdinOptionSync>([objectModeOnly]);3714-expectNotAssignable<StdoutStderrOption>(objectModeOnly);3715-expectNotAssignable<StdoutStderrOptionSync>(objectModeOnly);3716-expectNotAssignable<StdoutStderrOption>([objectModeOnly]);3717-expectNotAssignable<StdoutStderrOptionSync>([objectModeOnly]);3718-expectNotAssignable<StdioOption>(objectModeOnly);3719-expectNotAssignable<StdioOptionSync>(objectModeOnly);3720-expectNotAssignable<StdioOption>([objectModeOnly]);3721-expectNotAssignable<StdioOptionSync>([objectModeOnly]);3722-expectError(execa('unicorns', {stdin: finalOnly}));3723-expectError(execaSync('unicorns', {stdin: finalOnly}));3724-expectError(execa('unicorns', {stdin: [finalOnly]}));3725-expectError(execaSync('unicorns', {stdin: [finalOnly]}));3726-expectError(execa('unicorns', {stdout: finalOnly}));3727-expectError(execaSync('unicorns', {stdout: finalOnly}));3728-expectError(execa('unicorns', {stdout: [finalOnly]}));3729-expectError(execaSync('unicorns', {stdout: [finalOnly]}));3730-expectError(execa('unicorns', {stderr: finalOnly}));3731-expectError(execaSync('unicorns', {stderr: finalOnly}));3732-expectError(execa('unicorns', {stderr: [finalOnly]}));3733-expectError(execaSync('unicorns', {stderr: [finalOnly]}));3734-expectError(execa('unicorns', {stdio: finalOnly}));3735-expectError(execaSync('unicorns', {stdio: finalOnly}));3736-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', finalOnly]}));3737-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', finalOnly]}));3738-expectError(execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [finalOnly]]}));3739-expectError(execaSync('unicorns', {stdio: ['pipe', 'pipe', 'pipe', [finalOnly]]}));3740-expectNotAssignable<StdinOption>(finalOnly);3741-expectNotAssignable<StdinOptionSync>(finalOnly);3742-expectNotAssignable<StdinOption>([finalOnly]);3743-expectNotAssignable<StdinOptionSync>([finalOnly]);3744-expectNotAssignable<StdoutStderrOption>(finalOnly);3745-expectNotAssignable<StdoutStderrOptionSync>(finalOnly);3746-expectNotAssignable<StdoutStderrOption>([finalOnly]);3747-expectNotAssignable<StdoutStderrOptionSync>([finalOnly]);3748-expectNotAssignable<StdioOption>(finalOnly);3749-expectNotAssignable<StdioOptionSync>(finalOnly);3750-expectNotAssignable<StdioOption>([finalOnly]);3751-expectNotAssignable<StdioOptionSync>([finalOnly]);3752-3753-/* eslint-enable @typescript-eslint/no-floating-promises */3754-expectType<boolean>(execa('unicorns').kill());3755-execa('unicorns').kill('SIGKILL');3756-execa('unicorns').kill(undefined);3757-execa('unicorns').kill(new Error('test'));3758-execa('unicorns').kill('SIGKILL', new Error('test'));3759-execa('unicorns').kill(undefined, new Error('test'));3760-expectError(execa('unicorns').kill(null));3761-expectError(execa('unicorns').kill(0n));3762-expectError(execa('unicorns').kill([new Error('test')]));3763-expectError(execa('unicorns').kill({message: 'test'}));3764-expectError(execa('unicorns').kill(undefined, {}));3765-expectError(execa('unicorns').kill('SIGKILL', {}));3766-expectError(execa('unicorns').kill(null, new Error('test')));3767-3768-expectError(execa());3769-expectError(execa(true));3770-expectError(execa(['unicorns', 'arg']));3771-expectAssignable<ExecaSubprocess>(execa('unicorns'));3772-expectAssignable<ExecaSubprocess>(execa(fileUrl));3773-expectAssignable<ExecaSubprocess>(execa('unicorns', []));3774-expectAssignable<ExecaSubprocess>(execa('unicorns', ['foo']));3775-expectAssignable<ExecaSubprocess>(execa('unicorns', {}));3776-expectAssignable<ExecaSubprocess>(execa('unicorns', [], {}));3777-expectError(execa('unicorns', 'foo'));3778-expectError(execa('unicorns', [true]));3779-expectError(execa('unicorns', [], []));3780-expectError(execa('unicorns', {other: true}));3781-expectAssignable<ExecaSubprocess>(execa`unicorns`);3782-expectAssignable<typeof execa>(execa({}));3783-expectAssignable<ExecaSubprocess>(execa({})('unicorns'));3784-expectAssignable<ExecaSubprocess>(execa({})`unicorns`);3785-expectType<ExecaResult<{}>>(await execa('unicorns'));3786-expectType<ExecaResult<{}>>(await execa`unicorns`);3787-expectAssignable<{stdout: string}>(await execa('unicorns'));3788-expectAssignable<{stdout: Uint8Array}>(await execa('unicorns', {encoding: 'buffer'}));3789-expectAssignable<{stdout: string}>(await execa('unicorns', ['foo']));3790-expectAssignable<{stdout: Uint8Array}>(await execa('unicorns', ['foo'], {encoding: 'buffer'}));3791-expectAssignable<{stdout: string}>(await execa({})('unicorns'));3792-expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})('unicorns'));3793-expectAssignable<{stdout: Uint8Array}>(await execa({})({encoding: 'buffer'})('unicorns'));3794-expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})({})('unicorns'));3795-expectAssignable<{stdout: string}>(await execa({})`unicorns`);3796-expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})`unicorns`);3797-expectAssignable<{stdout: Uint8Array}>(await execa({})({encoding: 'buffer'})`unicorns`);3798-expectAssignable<{stdout: Uint8Array}>(await execa({encoding: 'buffer'})({})`unicorns`);3799-expectType<ExecaResult<{}>>(await execa`${'unicorns'}`);3800-expectType<ExecaResult<{}>>(await execa`unicorns ${'foo'}`);3801-expectType<ExecaResult<{}>>(await execa`unicorns ${'foo'} ${'bar'}`);3802-expectType<ExecaResult<{}>>(await execa`unicorns ${1}`);3803-expectType<ExecaResult<{}>>(await execa`unicorns ${stringArray}`);3804-expectType<ExecaResult<{}>>(await execa`unicorns ${[1, 2]}`);3805-expectType<ExecaResult<{}>>(await execa`unicorns ${await execa`echo foo`}`);3806-expectError(await execa`unicorns ${execa`echo foo`}`);3807-expectType<ExecaResult<{}>>(await execa`unicorns ${[await execa`echo foo`, 'bar']}`);3808-expectError(await execa`unicorns ${[execa`echo foo`, 'bar']}`);3809-expectType<ExecaResult<{}>>(await execa`unicorns ${true.toString()}`);3810-expectError(await execa`unicorns ${true}`);3811-3812-expectError(execaSync());3813-expectError(execaSync(true));3814-expectError(execaSync(['unicorns', 'arg']));3815-expectType<ExecaSyncResult<{}>>(execaSync('unicorns'));3816-expectType<ExecaSyncResult<{}>>(execaSync(fileUrl));3817-expectType<ExecaSyncResult<{}>>(execaSync('unicorns', []));3818-expectType<ExecaSyncResult<{}>>(execaSync('unicorns', ['foo']));3819-expectType<ExecaSyncResult<{}>>(execaSync('unicorns', {}));3820-expectType<ExecaSyncResult<{}>>(execaSync('unicorns', [], {}));3821-expectError(execaSync('unicorns', 'foo'));3822-expectError(execaSync('unicorns', [true]));3823-expectError(execaSync('unicorns', [], []));3824-expectError(execaSync('unicorns', {other: true}));3825-expectType<ExecaSyncResult<{}>>(execaSync`unicorns`);3826-expectAssignable<typeof execaSync>(execaSync({}));3827-expectType<ExecaSyncResult<{}>>(execaSync({})('unicorns'));3828-expectType<ExecaSyncResult<{}>>(execaSync({})`unicorns`);3829-expectType<ExecaSyncResult<{}>>(execaSync('unicorns'));3830-expectType<ExecaSyncResult<{}>>(execaSync`unicorns`);3831-expectAssignable<{stdout: string}>(execaSync('unicorns'));3832-expectAssignable<{stdout: Uint8Array}>(execaSync('unicorns', {encoding: 'buffer'}));3833-expectAssignable<{stdout: string}>(execaSync('unicorns', ['foo']));3834-expectAssignable<{stdout: Uint8Array}>(execaSync('unicorns', ['foo'], {encoding: 'buffer'}));3835-expectAssignable<{stdout: string}>(execaSync({})('unicorns'));3836-expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})('unicorns'));3837-expectAssignable<{stdout: Uint8Array}>(execaSync({})({encoding: 'buffer'})('unicorns'));3838-expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})({})('unicorns'));3839-expectAssignable<{stdout: string}>(execaSync({})`unicorns`);3840-expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})`unicorns`);3841-expectAssignable<{stdout: Uint8Array}>(execaSync({})({encoding: 'buffer'})`unicorns`);3842-expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})({})`unicorns`);3843-expectType<ExecaSyncResult<{}>>(execaSync`${'unicorns'}`);3844-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${'foo'}`);3845-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${'foo'} ${'bar'}`);3846-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${1}`);3847-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${stringArray}`);3848-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${[1, 2]}`);3849-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${execaSync`echo foo`}`);3850-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${[execaSync`echo foo`, 'bar']}`);3851-expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${false.toString()}`);3852-expectError(execaSync`unicorns ${false}`);3853-3854-expectError(execaCommand());3855-expectError(execaCommand(true));3856-expectError(execaCommand(['unicorns', 'arg']));3857-expectAssignable<ExecaSubprocess>(execaCommand('unicorns'));3858-expectError(execaCommand(fileUrl));3859-expectError(execaCommand('unicorns', []));3860-expectError(execaCommand('unicorns', ['foo']));3861-expectAssignable<ExecaSubprocess>(execaCommand('unicorns', {}));3862-expectError(execaCommand('unicorns', [], {}));3863-expectError(execaCommand('unicorns', 'foo'));3864-expectError(execaCommand('unicorns', [true]));3865-expectError(execaCommand('unicorns', [], []));3866-expectError(execaCommand('unicorns', {other: true}));3867-expectAssignable<ExecaSubprocess>(execaCommand`unicorns`);3868-expectAssignable<typeof execaCommand>(execaCommand({}));3869-expectAssignable<ExecaSubprocess>(execaCommand({})('unicorns'));3870-expectAssignable<ExecaSubprocess>(execaCommand({})`unicorns`);3871-expectType<ExecaResult<{}>>(await execaCommand('unicorns'));3872-expectType<ExecaResult<{}>>(await execaCommand`unicorns`);3873-expectAssignable<{stdout: string}>(await execaCommand('unicorns'));3874-expectAssignable<{stdout: Uint8Array}>(await execaCommand('unicorns', {encoding: 'buffer'}));3875-expectAssignable<{stdout: string}>(await execaCommand({})('unicorns'));3876-expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})('unicorns'));3877-expectAssignable<{stdout: Uint8Array}>(await execaCommand({})({encoding: 'buffer'})('unicorns'));3878-expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})({})('unicorns'));3879-expectAssignable<{stdout: string}>(await execaCommand({})`unicorns`);3880-expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})`unicorns`);3881-expectAssignable<{stdout: Uint8Array}>(await execaCommand({})({encoding: 'buffer'})`unicorns`);3882-expectAssignable<{stdout: Uint8Array}>(await execaCommand({encoding: 'buffer'})({})`unicorns`);3883-expectType<ExecaResult<{}>>(await execaCommand`${'unicorns'}`);3884-expectType<ExecaResult<{}>>(await execaCommand`unicorns ${'foo'}`);3885-expectError(await execaCommand`unicorns ${'foo'} ${'bar'}`);3886-expectError(await execaCommand`unicorns ${1}`);3887-expectError(await execaCommand`unicorns ${stringArray}`);3888-expectError(await execaCommand`unicorns ${[1, 2]}`);3889-expectError(await execaCommand`unicorns ${await execaCommand`echo foo`}`);3890-expectError(await execaCommand`unicorns ${execaCommand`echo foo`}`);3891-expectError(await execaCommand`unicorns ${[await execaCommand`echo foo`, 'bar']}`);3892-expectError(await execaCommand`unicorns ${[execaCommand`echo foo`, 'bar']}`);3893-expectType<ExecaResult<{}>>(await execaCommand`unicorns ${true.toString()}`);3894-expectError(await execaCommand`unicorns ${true}`);3895-3896-expectError(execaCommandSync());3897-expectError(execaCommandSync(true));3898-expectError(execaCommandSync(['unicorns', 'arg']));3899-expectType<ExecaSyncResult<{}>>(execaCommandSync('unicorns'));3900-expectError(execaCommandSync(fileUrl));3901-expectError(execaCommandSync('unicorns', []));3902-expectError(execaCommandSync('unicorns', ['foo']));3903-expectType<ExecaSyncResult<{}>>(execaCommandSync('unicorns', {}));3904-expectError(execaCommandSync('unicorns', [], {}));3905-expectError(execaCommandSync('unicorns', 'foo'));3906-expectError(execaCommandSync('unicorns', [true]));3907-expectError(execaCommandSync('unicorns', [], []));3908-expectError(execaCommandSync('unicorns', {other: true}));3909-expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns`);3910-expectAssignable<typeof execaCommandSync>(execaCommandSync({}));3911-expectType<ExecaSyncResult<{}>>(execaCommandSync({})('unicorns'));3912-expectType<ExecaSyncResult<{}>>(execaCommandSync({})`unicorns`);3913-expectType<ExecaSyncResult<{}>>(execaCommandSync('unicorns'));3914-expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns`);3915-expectAssignable<{stdout: string}>(execaCommandSync('unicorns'));3916-expectAssignable<{stdout: Uint8Array}>(execaCommandSync('unicorns', {encoding: 'buffer'}));3917-expectAssignable<{stdout: string}>(execaCommandSync({})('unicorns'));3918-expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})('unicorns'));3919-expectAssignable<{stdout: Uint8Array}>(execaCommandSync({})({encoding: 'buffer'})('unicorns'));3920-expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})({})('unicorns'));3921-expectAssignable<{stdout: string}>(execaCommandSync({})`unicorns`);3922-expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})`unicorns`);3923-expectAssignable<{stdout: Uint8Array}>(execaCommandSync({})({encoding: 'buffer'})`unicorns`);3924-expectAssignable<{stdout: Uint8Array}>(execaCommandSync({encoding: 'buffer'})({})`unicorns`);3925-expectType<ExecaSyncResult<{}>>(execaCommandSync`${'unicorns'}`);3926-expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns ${'foo'}`);3927-expectError(execaCommandSync`unicorns ${'foo'} ${'bar'}`);3928-expectError(execaCommandSync`unicorns ${1}`);3929-expectError(execaCommandSync`unicorns ${stringArray}`);3930-expectError(execaCommandSync`unicorns ${[1, 2]}`);3931-expectError(execaCommandSync`unicorns ${execaCommandSync`echo foo`}`);3932-expectError(execaCommandSync`unicorns ${[execaCommandSync`echo foo`, 'bar']}`);3933-expectType<ExecaSyncResult<{}>>(execaCommandSync`unicorns ${false.toString()}`);3934-expectError(execaCommandSync`unicorns ${false}`);3935-3936-expectError($());3937-expectError($(true));3938-expectError($(['unicorns', 'arg']));3939-expectAssignable<ExecaSubprocess>($('unicorns'));3940-expectAssignable<ExecaSubprocess>($(fileUrl));3941-expectAssignable<ExecaSubprocess>($('unicorns', []));3942-expectAssignable<ExecaSubprocess>($('unicorns', ['foo']));3943-expectAssignable<ExecaSubprocess>($('unicorns', {}));3944-expectAssignable<ExecaSubprocess>($('unicorns', [], {}));3945-expectError($('unicorns', 'foo'));3946-expectError($('unicorns', [true]));3947-expectError($('unicorns', [], []));3948-expectError($('unicorns', {other: true}));3949-expectAssignable<ExecaSubprocess>($`unicorns`);3950-expectAssignable<typeof $>($({}));3951-expectAssignable<ExecaSubprocess>($({})('unicorns'));3952-expectAssignable<ExecaSubprocess>($({})`unicorns`);3953-expectType<ExecaResult<{}>>(await $('unicorns'));3954-expectType<ExecaResult<{}>>(await $`unicorns`);3955-expectAssignable<{stdout: string}>(await $('unicorns'));3956-expectAssignable<{stdout: Uint8Array}>(await $('unicorns', {encoding: 'buffer'}));3957-expectAssignable<{stdout: string}>(await $('unicorns', ['foo']));3958-expectAssignable<{stdout: Uint8Array}>(await $('unicorns', ['foo'], {encoding: 'buffer'}));3959-expectAssignable<{stdout: string}>(await $({})('unicorns'));3960-expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})('unicorns'));3961-expectAssignable<{stdout: Uint8Array}>(await $({})({encoding: 'buffer'})('unicorns'));3962-expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})({})('unicorns'));3963-expectAssignable<{stdout: string}>(await $({})`unicorns`);3964-expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})`unicorns`);3965-expectAssignable<{stdout: Uint8Array}>(await $({})({encoding: 'buffer'})`unicorns`);3966-expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})({})`unicorns`);3967-expectType<ExecaResult<{}>>(await $`${'unicorns'}`);3968-expectType<ExecaResult<{}>>(await $`unicorns ${'foo'}`);3969-expectType<ExecaResult<{}>>(await $`unicorns ${'foo'} ${'bar'}`);3970-expectType<ExecaResult<{}>>(await $`unicorns ${1}`);3971-expectType<ExecaResult<{}>>(await $`unicorns ${stringArray}`);3972-expectType<ExecaResult<{}>>(await $`unicorns ${[1, 2]}`);3973-expectType<ExecaResult<{}>>(await $`unicorns ${await $`echo foo`}`);3974-expectError(await $`unicorns ${$`echo foo`}`);3975-expectType<ExecaResult<{}>>(await $`unicorns ${[await $`echo foo`, 'bar']}`);3976-expectError(await $`unicorns ${[$`echo foo`, 'bar']}`);3977-expectType<ExecaResult<{}>>(await $`unicorns ${true.toString()}`);3978-expectError(await $`unicorns ${true}`);3979-3980-expectError($.sync());3981-expectError($.sync(true));3982-expectError($.sync(['unicorns', 'arg']));3983-expectType<ExecaSyncResult<{}>>($.sync('unicorns'));3984-expectType<ExecaSyncResult<{}>>($.sync(fileUrl));3985-expectType<ExecaSyncResult<{}>>($.sync('unicorns', []));3986-expectType<ExecaSyncResult<{}>>($.sync('unicorns', ['foo']));3987-expectType<ExecaSyncResult<{}>>($.sync('unicorns', {}));3988-expectType<ExecaSyncResult<{}>>($.sync('unicorns', [], {}));3989-expectError($.sync('unicorns', 'foo'));3990-expectError($.sync('unicorns', [true]));3991-expectError($.sync('unicorns', [], []));3992-expectError($.sync('unicorns', {other: true}));3993-expectType<ExecaSyncResult<{}>>($.sync`unicorns`);3994-expectAssignable<typeof $.sync>($.sync({}));3995-expectType<ExecaSyncResult<{}>>($.sync({})('unicorns'));3996-expectType<ExecaSyncResult<{}>>($({}).sync('unicorns'));3997-expectType<ExecaSyncResult<{}>>($.sync({})`unicorns`);3998-expectType<ExecaSyncResult<{}>>($({}).sync`unicorns`);3999-expectType<ExecaSyncResult<{}>>($.sync('unicorns'));4000-expectType<ExecaSyncResult<{}>>($.sync`unicorns`);4001-expectAssignable<{stdout: string}>($.sync('unicorns'));4002-expectAssignable<{stdout: Uint8Array}>($.sync('unicorns', {encoding: 'buffer'}));4003-expectAssignable<{stdout: string}>($.sync('unicorns', ['foo']));4004-expectAssignable<{stdout: Uint8Array}>($.sync('unicorns', ['foo'], {encoding: 'buffer'}));4005-expectAssignable<{stdout: string}>($.sync({})('unicorns'));4006-expectAssignable<{stdout: string}>($({}).sync('unicorns'));4007-expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})('unicorns'));4008-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync('unicorns'));4009-expectAssignable<{stdout: Uint8Array}>($.sync({})({encoding: 'buffer'})('unicorns'));4010-expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).sync('unicorns'));4011-expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})({})('unicorns'));4012-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync({})('unicorns'));4013-expectAssignable<{stdout: string}>($.sync({})`unicorns`);4014-expectAssignable<{stdout: string}>($({}).sync`unicorns`);4015-expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})`unicorns`);4016-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync`unicorns`);4017-expectAssignable<{stdout: Uint8Array}>($.sync({})({encoding: 'buffer'})`unicorns`);4018-expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).sync`unicorns`);4019-expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})({})`unicorns`);4020-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync({})`unicorns`);4021-expectType<ExecaSyncResult<{}>>($.sync`${'unicorns'}`);4022-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${'foo'}`);4023-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${'foo'} ${'bar'}`);4024-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${1}`);4025-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${stringArray}`);4026-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${[1, 2]}`);4027-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${$.sync`echo foo`}`);4028-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${[$.sync`echo foo`, 'bar']}`);4029-expectType<ExecaSyncResult<{}>>($.sync`unicorns ${false.toString()}`);4030-expectError($.sync`unicorns ${false}`);4031-4032-expectError($.s());4033-expectError($.s(true));4034-expectError($.s(['unicorns', 'arg']));4035-expectType<ExecaSyncResult<{}>>($.s('unicorns'));4036-expectType<ExecaSyncResult<{}>>($.s(fileUrl));4037-expectType<ExecaSyncResult<{}>>($.s('unicorns', []));4038-expectType<ExecaSyncResult<{}>>($.s('unicorns', ['foo']));4039-expectType<ExecaSyncResult<{}>>($.s('unicorns', {}));4040-expectType<ExecaSyncResult<{}>>($.s('unicorns', [], {}));4041-expectError($.s('unicorns', 'foo'));4042-expectError($.s('unicorns', [true]));4043-expectError($.s('unicorns', [], []));4044-expectError($.s('unicorns', {other: true}));4045-expectType<ExecaSyncResult<{}>>($.s`unicorns`);4046-expectAssignable<typeof $.s>($.s({}));4047-expectType<ExecaSyncResult<{}>>($.s({})('unicorns'));4048-expectType<ExecaSyncResult<{}>>($({}).s('unicorns'));4049-expectType<ExecaSyncResult<{}>>($.s({})`unicorns`);4050-expectType<ExecaSyncResult<{}>>($({}).s`unicorns`);4051-expectType<ExecaSyncResult<{}>>($.s('unicorns'));4052-expectType<ExecaSyncResult<{}>>($.s`unicorns`);4053-expectAssignable<{stdout: string}>($.s('unicorns'));4054-expectAssignable<{stdout: Uint8Array}>($.s('unicorns', {encoding: 'buffer'}));4055-expectAssignable<{stdout: string}>($.s('unicorns', ['foo']));4056-expectAssignable<{stdout: Uint8Array}>($.s('unicorns', ['foo'], {encoding: 'buffer'}));4057-expectAssignable<{stdout: string}>($.s({})('unicorns'));4058-expectAssignable<{stdout: string}>($({}).s('unicorns'));4059-expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})('unicorns'));4060-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s('unicorns'));4061-expectAssignable<{stdout: Uint8Array}>($.s({})({encoding: 'buffer'})('unicorns'));4062-expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).s('unicorns'));4063-expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})({})('unicorns'));4064-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s({})('unicorns'));4065-expectAssignable<{stdout: string}>($.s({})`unicorns`);4066-expectAssignable<{stdout: string}>($({}).s`unicorns`);4067-expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})`unicorns`);4068-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s`unicorns`);4069-expectAssignable<{stdout: Uint8Array}>($.s({})({encoding: 'buffer'})`unicorns`);4070-expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).s`unicorns`);4071-expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})({})`unicorns`);4072-expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s({})`unicorns`);4073-expectType<ExecaSyncResult<{}>>($.s`${'unicorns'}`);4074-expectType<ExecaSyncResult<{}>>($.s`unicorns ${'foo'}`);4075-expectType<ExecaSyncResult<{}>>($.s`unicorns ${'foo'} ${'bar'}`);4076-expectType<ExecaSyncResult<{}>>($.s`unicorns ${1}`);4077-expectType<ExecaSyncResult<{}>>($.s`unicorns ${stringArray}`);4078-expectType<ExecaSyncResult<{}>>($.s`unicorns ${[1, 2]}`);4079-expectType<ExecaSyncResult<{}>>($.s`unicorns ${$.s`echo foo`}`);4080-expectType<ExecaSyncResult<{}>>($.s`unicorns ${[$.s`echo foo`, 'bar']}`);4081-expectType<ExecaSyncResult<{}>>($.s`unicorns ${false.toString()}`);4082-expectError($.s`unicorns ${false}`);4083-4084-expectError(execaNode());4085-expectError(execaNode(true));4086-expectError(execaNode(['unicorns', 'arg']));4087-expectAssignable<ExecaSubprocess>(execaNode('unicorns'));4088-expectAssignable<ExecaSubprocess>(execaNode(fileUrl));4089-expectAssignable<ExecaSubprocess>(execaNode('unicorns', []));4090-expectAssignable<ExecaSubprocess>(execaNode('unicorns', ['foo']));4091-expectAssignable<ExecaSubprocess>(execaNode('unicorns', {}));4092-expectAssignable<ExecaSubprocess>(execaNode('unicorns', [], {}));4093-expectError(execaNode('unicorns', 'foo'));4094-expectError(execaNode('unicorns', [true]));4095-expectError(execaNode('unicorns', [], []));4096-expectError(execaNode('unicorns', {other: true}));4097-expectAssignable<ExecaSubprocess>(execaNode`unicorns`);4098-expectAssignable<typeof execaNode>(execaNode({}));4099-expectAssignable<ExecaSubprocess>(execaNode({})('unicorns'));4100-expectAssignable<ExecaSubprocess>(execaNode({})`unicorns`);4101-expectType<ExecaResult<{}>>(await execaNode('unicorns'));4102-expectType<ExecaResult<{}>>(await execaNode`unicorns`);4103-expectAssignable<{stdout: string}>(await execaNode('unicorns'));4104-expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', {encoding: 'buffer'}));4105-expectAssignable<{stdout: string}>(await execaNode('unicorns', ['foo']));4106-expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', ['foo'], {encoding: 'buffer'}));4107-expectAssignable<{stdout: string}>(await execaNode({})('unicorns'));4108-expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})('unicorns'));4109-expectAssignable<{stdout: Uint8Array}>(await execaNode({})({encoding: 'buffer'})('unicorns'));4110-expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})({})('unicorns'));4111-expectAssignable<{stdout: string}>(await execaNode({})`unicorns`);4112-expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})`unicorns`);4113-expectAssignable<{stdout: Uint8Array}>(await execaNode({})({encoding: 'buffer'})`unicorns`);4114-expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})({})`unicorns`);4115-expectType<ExecaResult<{}>>(await execaNode`${'unicorns'}`);4116-expectType<ExecaResult<{}>>(await execaNode`unicorns ${'foo'}`);4117-expectType<ExecaResult<{}>>(await execaNode`unicorns ${'foo'} ${'bar'}`);4118-expectType<ExecaResult<{}>>(await execaNode`unicorns ${1}`);4119-expectType<ExecaResult<{}>>(await execaNode`unicorns ${stringArray}`);4120-expectType<ExecaResult<{}>>(await execaNode`unicorns ${[1, 2]}`);4121-expectType<ExecaResult<{}>>(await execaNode`unicorns ${await execaNode`echo foo`}`);4122-expectError(await execaNode`unicorns ${execaNode`echo foo`}`);4123-expectType<ExecaResult<{}>>(await execaNode`unicorns ${[await execaNode`echo foo`, 'bar']}`);4124-expectError(await execaNode`unicorns ${[execaNode`echo foo`, 'bar']}`);4125-expectType<ExecaResult<{}>>(await execaNode`unicorns ${true.toString()}`);4126-expectError(await execaNode`unicorns ${true}`);4127-4128-expectAssignable<ExecaSubprocess>(execaNode('unicorns', {nodePath: './node'}));4129-expectAssignable<ExecaSubprocess>(execaNode('unicorns', {nodePath: fileUrl}));4130-expectAssignable<{stdout: string}>(await execaNode('unicorns', {nodeOptions: ['--async-stack-traces']}));4131-expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', {nodeOptions: ['--async-stack-traces'], encoding: 'buffer'}));4132-expectAssignable<{stdout: string}>(await execaNode('unicorns', ['foo'], {nodeOptions: ['--async-stack-traces']}));4133-expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', ['foo'], {nodeOptions: ['--async-stack-traces'], encoding: 'buffer'}));modified:package.json+3 added-2 removed
23 unmodified lines24 },25 "files": [26 "index.js",27 "index.d.ts",28- "lib"28+ "lib",29+ "types"30 ],31 "keywords": [32 "exec",33 "child",54 unmodified lines88 },89 "ava": {90 "workerThreads": false,91 "concurrency": 1,91- "timeout": "120s"92+ "timeout": "240s"93 },94 "xo": {95 "rules": {96 "unicorn/no-empty-file": "off",4 unmodified lines