Skip to content
Myr

Rename some types (#1009)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ehmicky · committed by GitHub · parent c6ce870 · Browse files · 21 files+238 added−238 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

21 files+238 added−238 removed

  • other:+238 added−238 removed

21 files+238 added−238 removed

modified:docs/api.md+9 added-9 removed
13 unmodified lines
1415`file`: `string | URL`\16`arguments`: `string[]`\17`options`: [`Options`](#options)\18_Returns_: [`ExecaResultPromise`](#return-value)18_Returns_: [`ResultPromise`](#return-value)1920Executes a command using `file ...arguments`.2122More info on the [syntax](execution.md#array-syntax) and [escaping](escaping.md#array-syntax).
2 unmodified lines
25### execa(options)\`command\`2627`command`: `string`\28`options`: [`Options`](#options)\29_Returns_: [`ExecaResultPromise`](#return-value)29_Returns_: [`ResultPromise`](#return-value)3031Executes a command. `command` is a [template string](execution.md#template-string-syntax) that includes both the `file` and its `arguments`.3233More info on the [syntax](execution.md#template-string-syntax) and [escaping](escaping.md#template-string-syntax).
9 unmodified lines
4344### execaSync(file, arguments?, options?)45### execaSync\`command\`4647_Returns_: [`ExecaSyncResult`](#return-value)47_Returns_: [`SyncResult`](#return-value)4849Same as [`execa()`](#execafile-arguments-options) but synchronous.5051Returns or throws a subprocess [`result`](#result). The [`subprocess`](#subprocess) is not returned: its methods and properties are not available.
4 unmodified lines
5657`file`: `string | URL`\58`arguments`: `string[]`\59`options`: [`Options`](#options)\60_Returns_: [`ExecaResultPromise`](#return-value)60_Returns_: [`ResultPromise`](#return-value)6162Same as [`execa()`](#execafile-arguments-options) but using [script-friendly default options](scripts.md#script-files).6364Just like `execa()`, this can use the [template string syntax](execution.md#template-string-syntax) or [bind options](execution.md#globalshared-options). It can also be [run synchronously](#execasyncfile-arguments-options) using `$.sync()` or `$.s()`.
6 unmodified lines
7172`scriptPath`: `string | URL`\73`arguments`: `string[]`\74`options`: [`Options`](#options)\75_Returns_: [`ExecaResultPromise`](#return-value)75_Returns_: [`ResultPromise`](#return-value)7677Same as [`execa()`](#execafile-arguments-options) but using the [`node: true`](#optionsnode) option.78Executes a Node.js file using `node scriptPath ...arguments`.79
6 unmodified lines
86### execaCommand(command, options?)8788`command`: `string`\89`options`: [`Options`](#options)\90_Returns_: [`ExecaResultPromise`](#return-value)90_Returns_: [`ResultPromise`](#return-value)9192Executes a command. `command` is a string that includes both the `file` and its `arguments`.9394This is only intended for very specific cases, such as a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop). This should be avoided otherwise.
3 unmodified lines
98[More info.](escaping.md#user-defined-input)99100## Return value101102_Type_: `ExecaResultPromise`102_Type_: `ResultPromise`103104The return value of all [asynchronous methods](#methods) is both:105- the [subprocess](#subprocess).106- a `Promise` either resolving with its successful [`result`](#result), or rejecting with its [`error`](#execaerror).
1 unmodified line
108[More info.](execution.md#subprocess)109110## Subprocess111112_Type_: `ExecaSubprocess`112_Type_: `Subprocess`113114[`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with the following methods and properties.115116### subprocess\[Symbol.asyncIterator\]()
38 unmodified lines
155[More info.](pipe.md#template-string-syntax)156157### subprocess.pipe(secondSubprocess, pipeOptions?)158159`secondSubprocess`: [`ExecaResultPromise`](#return-value)\159`secondSubprocess`: [`ResultPromise`](#return-value)\160`pipeOptions`: [`PipeOptions`](#pipeoptions)\161_Returns_: [`Promise<Result>`](#result)162163Like [`subprocess.pipe(file, arguments?, options?)`](#subprocesspipefile-arguments-options) but using the [return value](#return-value) of another [`execa()`](#execafile-arguments-options) call instead.
880 unmodified lines
modified:test-d/methods/command.test-d.ts+23 added-23 removed
modified:test-d/methods/main-async.test-d.ts+21 added-21 removed
modified:test-d/methods/main-sync.test-d.ts+21 added-21 removed
1import {expectType, expectError, expectAssignable} from 'tsd';2import {execaSync, type ExecaSyncResult} from '../../index.js';2import {execaSync, type SyncResult} from '../../index.js';34const fileUrl = new URL('file:///test');5const stringArray = ['foo', 'bar'] as const;67expectError(execaSync());8expectError(execaSync(true));9expectError(execaSync(['unicorns', 'arg']));10expectType<ExecaSyncResult<{}>>(execaSync('unicorns'));11expectType<ExecaSyncResult<{}>>(execaSync(fileUrl));10expectType<SyncResult<{}>>(execaSync('unicorns'));11expectType<SyncResult<{}>>(execaSync(fileUrl));1213expectType<ExecaSyncResult<{}>>(execaSync('unicorns', []));14expectType<ExecaSyncResult<{}>>(execaSync('unicorns', ['foo']));13expectType<SyncResult<{}>>(execaSync('unicorns', []));14expectType<SyncResult<{}>>(execaSync('unicorns', ['foo']));15expectError(execaSync('unicorns', 'foo'));16expectError(execaSync('unicorns', [true]));1718expectType<ExecaSyncResult<{}>>(execaSync('unicorns', {}));19expectType<ExecaSyncResult<{}>>(execaSync('unicorns', [], {}));18expectType<SyncResult<{}>>(execaSync('unicorns', {}));19expectType<SyncResult<{}>>(execaSync('unicorns', [], {}));20expectError(execaSync('unicorns', [], []));21expectError(execaSync('unicorns', {other: true}));2223expectType<ExecaSyncResult<{}>>(execaSync`unicorns`);24expectType<ExecaSyncResult<{}>>(execaSync('unicorns'));25expectType<ExecaSyncResult<{}>>(execaSync`unicorns`);23expectType<SyncResult<{}>>(execaSync`unicorns`);24expectType<SyncResult<{}>>(execaSync('unicorns'));25expectType<SyncResult<{}>>(execaSync`unicorns`);2627expectAssignable<typeof execaSync>(execaSync({}));28expectType<ExecaSyncResult<{}>>(execaSync({})('unicorns'));29expectType<ExecaSyncResult<{}>>(execaSync({})`unicorns`);28expectType<SyncResult<{}>>(execaSync({})('unicorns'));29expectType<SyncResult<{}>>(execaSync({})`unicorns`);3031expectAssignable<{stdout: string}>(execaSync('unicorns'));32expectAssignable<{stdout: Uint8Array}>(execaSync('unicorns', {encoding: 'buffer'}));33expectAssignable<{stdout: string}>(execaSync('unicorns', ['foo']));
6 unmodified lines
40expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})`unicorns`);41expectAssignable<{stdout: Uint8Array}>(execaSync({})({encoding: 'buffer'})`unicorns`);42expectAssignable<{stdout: Uint8Array}>(execaSync({encoding: 'buffer'})({})`unicorns`);4344expectType<ExecaSyncResult<{}>>(execaSync`${'unicorns'}`);45expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${'foo'}`);46expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${'foo'} ${'bar'}`);47expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${1}`);48expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${stringArray}`);49expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${[1, 2]}`);50expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${false.toString()}`);44expectType<SyncResult<{}>>(execaSync`${'unicorns'}`);45expectType<SyncResult<{}>>(execaSync`unicorns ${'foo'}`);46expectType<SyncResult<{}>>(execaSync`unicorns ${'foo'} ${'bar'}`);47expectType<SyncResult<{}>>(execaSync`unicorns ${1}`);48expectType<SyncResult<{}>>(execaSync`unicorns ${stringArray}`);49expectType<SyncResult<{}>>(execaSync`unicorns ${[1, 2]}`);50expectType<SyncResult<{}>>(execaSync`unicorns ${false.toString()}`);51expectError(execaSync`unicorns ${false}`);5253expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${execaSync`echo foo`}`);54expectType<ExecaSyncResult<{}>>(execaSync`unicorns ${[execaSync`echo foo`, 'bar']}`);53expectType<SyncResult<{}>>(execaSync`unicorns ${execaSync`echo foo`}`);54expectType<SyncResult<{}>>(execaSync`unicorns ${[execaSync`echo foo`, 'bar']}`);
modified:test-d/methods/node.test-d.ts+23 added-23 removed
1import {expectType, expectError, expectAssignable} from 'tsd';2import {execaNode, type ExecaResult, type ExecaResultPromise} from '../../index.js';2import {execaNode, type Result, type ResultPromise} from '../../index.js';34const fileUrl = new URL('file:///test');5const stringArray = ['foo', 'bar'] as const;67expectError(execaNode());8expectError(execaNode(true));9expectError(execaNode(['unicorns', 'arg']));10expectAssignable<ExecaResultPromise>(execaNode('unicorns'));11expectAssignable<ExecaResultPromise>(execaNode(fileUrl));10expectAssignable<ResultPromise>(execaNode('unicorns'));11expectAssignable<ResultPromise>(execaNode(fileUrl));1213expectAssignable<ExecaResultPromise>(execaNode('unicorns', []));14expectAssignable<ExecaResultPromise>(execaNode('unicorns', ['foo']));13expectAssignable<ResultPromise>(execaNode('unicorns', []));14expectAssignable<ResultPromise>(execaNode('unicorns', ['foo']));15expectError(execaNode('unicorns', 'foo'));16expectError(execaNode('unicorns', [true]));1718expectAssignable<ExecaResultPromise>(execaNode('unicorns', {}));19expectAssignable<ExecaResultPromise>(execaNode('unicorns', [], {}));18expectAssignable<ResultPromise>(execaNode('unicorns', {}));19expectAssignable<ResultPromise>(execaNode('unicorns', [], {}));20expectError(execaNode('unicorns', [], []));21expectError(execaNode('unicorns', {other: true}));2223expectAssignable<ExecaResultPromise>(execaNode`unicorns`);24expectType<ExecaResult<{}>>(await execaNode('unicorns'));25expectType<ExecaResult<{}>>(await execaNode`unicorns`);23expectAssignable<ResultPromise>(execaNode`unicorns`);24expectType<Result<{}>>(await execaNode('unicorns'));25expectType<Result<{}>>(await execaNode`unicorns`);2627expectAssignable<typeof execaNode>(execaNode({}));28expectAssignable<ExecaResultPromise>(execaNode({})('unicorns'));29expectAssignable<ExecaResultPromise>(execaNode({})`unicorns`);28expectAssignable<ResultPromise>(execaNode({})('unicorns'));29expectAssignable<ResultPromise>(execaNode({})`unicorns`);3031expectAssignable<{stdout: string}>(await execaNode('unicorns'));32expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', {encoding: 'buffer'}));33expectAssignable<{stdout: string}>(await execaNode('unicorns', ['foo']));
6 unmodified lines
40expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})`unicorns`);41expectAssignable<{stdout: Uint8Array}>(await execaNode({})({encoding: 'buffer'})`unicorns`);42expectAssignable<{stdout: Uint8Array}>(await execaNode({encoding: 'buffer'})({})`unicorns`);4344expectType<ExecaResult<{}>>(await execaNode`${'unicorns'}`);45expectType<ExecaResult<{}>>(await execaNode`unicorns ${'foo'}`);46expectType<ExecaResult<{}>>(await execaNode`unicorns ${'foo'} ${'bar'}`);47expectType<ExecaResult<{}>>(await execaNode`unicorns ${1}`);48expectType<ExecaResult<{}>>(await execaNode`unicorns ${stringArray}`);49expectType<ExecaResult<{}>>(await execaNode`unicorns ${[1, 2]}`);50expectType<ExecaResult<{}>>(await execaNode`unicorns ${false.toString()}`);44expectType<Result<{}>>(await execaNode`${'unicorns'}`);45expectType<Result<{}>>(await execaNode`unicorns ${'foo'}`);46expectType<Result<{}>>(await execaNode`unicorns ${'foo'} ${'bar'}`);47expectType<Result<{}>>(await execaNode`unicorns ${1}`);48expectType<Result<{}>>(await execaNode`unicorns ${stringArray}`);49expectType<Result<{}>>(await execaNode`unicorns ${[1, 2]}`);50expectType<Result<{}>>(await execaNode`unicorns ${false.toString()}`);51expectError(await execaNode`unicorns ${false}`);5253expectType<ExecaResult<{}>>(await execaNode`unicorns ${await execaNode`echo foo`}`);53expectType<Result<{}>>(await execaNode`unicorns ${await execaNode`echo foo`}`);54expectError(await execaNode`unicorns ${execaNode`echo foo`}`);55expectType<ExecaResult<{}>>(await execaNode`unicorns ${[await execaNode`echo foo`, 'bar']}`);55expectType<Result<{}>>(await execaNode`unicorns ${[await execaNode`echo foo`, 'bar']}`);56expectError(await execaNode`unicorns ${[execaNode`echo foo`, 'bar']}`);5758expectAssignable<ExecaResultPromise>(execaNode('unicorns', {nodePath: './node'}));59expectAssignable<ExecaResultPromise>(execaNode('unicorns', {nodePath: fileUrl}));58expectAssignable<ResultPromise>(execaNode('unicorns', {nodePath: './node'}));59expectAssignable<ResultPromise>(execaNode('unicorns', {nodePath: fileUrl}));60expectAssignable<{stdout: string}>(await execaNode('unicorns', {nodeOptions: ['--async-stack-traces']}));61expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', {nodeOptions: ['--async-stack-traces'], encoding: 'buffer'}));62expectAssignable<{stdout: string}>(await execaNode('unicorns', ['foo'], {nodeOptions: ['--async-stack-traces']}));63expectAssignable<{stdout: Uint8Array}>(await execaNode('unicorns', ['foo'], {nodeOptions: ['--async-stack-traces'], encoding: 'buffer'}));
modified:test-d/methods/script-s.test-d.ts+23 added-23 removed
1import {expectType, expectError, expectAssignable} from 'tsd';2import {$, type ExecaSyncResult} from '../../index.js';2import {$, type SyncResult} from '../../index.js';34const fileUrl = new URL('file:///test');5const stringArray = ['foo', 'bar'] as const;67expectError($.s());8expectError($.s(true));9expectError($.s(['unicorns', 'arg']));10expectType<ExecaSyncResult<{}>>($.s('unicorns'));11expectType<ExecaSyncResult<{}>>($.s(fileUrl));10expectType<SyncResult<{}>>($.s('unicorns'));11expectType<SyncResult<{}>>($.s(fileUrl));1213expectType<ExecaSyncResult<{}>>($.s('unicorns', []));14expectType<ExecaSyncResult<{}>>($.s('unicorns', ['foo']));13expectType<SyncResult<{}>>($.s('unicorns', []));14expectType<SyncResult<{}>>($.s('unicorns', ['foo']));15expectError($.s('unicorns', 'foo'));16expectError($.s('unicorns', [true]));1718expectType<ExecaSyncResult<{}>>($.s('unicorns', {}));19expectType<ExecaSyncResult<{}>>($.s('unicorns', [], {}));18expectType<SyncResult<{}>>($.s('unicorns', {}));19expectType<SyncResult<{}>>($.s('unicorns', [], {}));20expectError($.s('unicorns', [], []));21expectError($.s('unicorns', {other: true}));2223expectType<ExecaSyncResult<{}>>($.s`unicorns`);24expectType<ExecaSyncResult<{}>>($.s('unicorns'));25expectType<ExecaSyncResult<{}>>($.s`unicorns`);23expectType<SyncResult<{}>>($.s`unicorns`);24expectType<SyncResult<{}>>($.s('unicorns'));25expectType<SyncResult<{}>>($.s`unicorns`);2627expectAssignable<typeof $.s>($.s({}));28expectType<ExecaSyncResult<{}>>($.s({})('unicorns'));29expectType<ExecaSyncResult<{}>>($({}).s('unicorns'));30expectType<ExecaSyncResult<{}>>($.s({})`unicorns`);31expectType<ExecaSyncResult<{}>>($({}).s`unicorns`);28expectType<SyncResult<{}>>($.s({})('unicorns'));29expectType<SyncResult<{}>>($({}).s('unicorns'));30expectType<SyncResult<{}>>($.s({})`unicorns`);31expectType<SyncResult<{}>>($({}).s`unicorns`);3233expectAssignable<{stdout: string}>($.s('unicorns'));34expectAssignable<{stdout: Uint8Array}>($.s('unicorns', {encoding: 'buffer'}));35expectAssignable<{stdout: string}>($.s('unicorns', ['foo']));
14 unmodified lines
50expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).s`unicorns`);51expectAssignable<{stdout: Uint8Array}>($.s({encoding: 'buffer'})({})`unicorns`);52expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).s({})`unicorns`);5354expectType<ExecaSyncResult<{}>>($.s`${'unicorns'}`);55expectType<ExecaSyncResult<{}>>($.s`unicorns ${'foo'}`);56expectType<ExecaSyncResult<{}>>($.s`unicorns ${'foo'} ${'bar'}`);57expectType<ExecaSyncResult<{}>>($.s`unicorns ${1}`);58expectType<ExecaSyncResult<{}>>($.s`unicorns ${stringArray}`);59expectType<ExecaSyncResult<{}>>($.s`unicorns ${[1, 2]}`);60expectType<ExecaSyncResult<{}>>($.s`unicorns ${false.toString()}`);54expectType<SyncResult<{}>>($.s`${'unicorns'}`);55expectType<SyncResult<{}>>($.s`unicorns ${'foo'}`);56expectType<SyncResult<{}>>($.s`unicorns ${'foo'} ${'bar'}`);57expectType<SyncResult<{}>>($.s`unicorns ${1}`);58expectType<SyncResult<{}>>($.s`unicorns ${stringArray}`);59expectType<SyncResult<{}>>($.s`unicorns ${[1, 2]}`);60expectType<SyncResult<{}>>($.s`unicorns ${false.toString()}`);61expectError($.s`unicorns ${false}`);6263expectType<ExecaSyncResult<{}>>($.s`unicorns ${$.s`echo foo`}`);64expectType<ExecaSyncResult<{}>>($.s`unicorns ${[$.s`echo foo`, 'bar']}`);63expectType<SyncResult<{}>>($.s`unicorns ${$.s`echo foo`}`);64expectType<SyncResult<{}>>($.s`unicorns ${[$.s`echo foo`, 'bar']}`);
modified:test-d/methods/script-sync.test-d.ts+23 added-23 removed
1import {expectType, expectError, expectAssignable} from 'tsd';2import {$, type ExecaSyncResult} from '../../index.js';2import {$, type SyncResult} from '../../index.js';34const fileUrl = new URL('file:///test');5const stringArray = ['foo', 'bar'] as const;67expectError($.sync());8expectError($.sync(true));9expectError($.sync(['unicorns', 'arg']));10expectType<ExecaSyncResult<{}>>($.sync('unicorns'));11expectType<ExecaSyncResult<{}>>($.sync(fileUrl));10expectType<SyncResult<{}>>($.sync('unicorns'));11expectType<SyncResult<{}>>($.sync(fileUrl));1213expectType<ExecaSyncResult<{}>>($.sync('unicorns', []));14expectType<ExecaSyncResult<{}>>($.sync('unicorns', ['foo']));13expectType<SyncResult<{}>>($.sync('unicorns', []));14expectType<SyncResult<{}>>($.sync('unicorns', ['foo']));15expectError($.sync('unicorns', 'foo'));16expectError($.sync('unicorns', [true]));1718expectType<ExecaSyncResult<{}>>($.sync('unicorns', {}));19expectType<ExecaSyncResult<{}>>($.sync('unicorns', [], {}));18expectType<SyncResult<{}>>($.sync('unicorns', {}));19expectType<SyncResult<{}>>($.sync('unicorns', [], {}));20expectError($.sync('unicorns', [], []));21expectError($.sync('unicorns', {other: true}));2223expectType<ExecaSyncResult<{}>>($.sync`unicorns`);24expectType<ExecaSyncResult<{}>>($.sync('unicorns'));25expectType<ExecaSyncResult<{}>>($.sync`unicorns`);23expectType<SyncResult<{}>>($.sync`unicorns`);24expectType<SyncResult<{}>>($.sync('unicorns'));25expectType<SyncResult<{}>>($.sync`unicorns`);2627expectAssignable<typeof $.sync>($.sync({}));28expectType<ExecaSyncResult<{}>>($.sync({})('unicorns'));29expectType<ExecaSyncResult<{}>>($({}).sync('unicorns'));30expectType<ExecaSyncResult<{}>>($.sync({})`unicorns`);31expectType<ExecaSyncResult<{}>>($({}).sync`unicorns`);28expectType<SyncResult<{}>>($.sync({})('unicorns'));29expectType<SyncResult<{}>>($({}).sync('unicorns'));30expectType<SyncResult<{}>>($.sync({})`unicorns`);31expectType<SyncResult<{}>>($({}).sync`unicorns`);3233expectAssignable<{stdout: string}>($.sync('unicorns'));34expectAssignable<{stdout: Uint8Array}>($.sync('unicorns', {encoding: 'buffer'}));35expectAssignable<{stdout: string}>($.sync('unicorns', ['foo']));
14 unmodified lines
50expectAssignable<{stdout: Uint8Array}>($({})({encoding: 'buffer'}).sync`unicorns`);51expectAssignable<{stdout: Uint8Array}>($.sync({encoding: 'buffer'})({})`unicorns`);52expectAssignable<{stdout: Uint8Array}>($({encoding: 'buffer'}).sync({})`unicorns`);5354expectType<ExecaSyncResult<{}>>($.sync`${'unicorns'}`);55expectType<ExecaSyncResult<{}>>($.sync`unicorns ${'foo'}`);56expectType<ExecaSyncResult<{}>>($.sync`unicorns ${'foo'} ${'bar'}`);57expectType<ExecaSyncResult<{}>>($.sync`unicorns ${1}`);58expectType<ExecaSyncResult<{}>>($.sync`unicorns ${stringArray}`);59expectType<ExecaSyncResult<{}>>($.sync`unicorns ${[1, 2]}`);60expectType<ExecaSyncResult<{}>>($.sync`unicorns ${false.toString()}`);54expectType<SyncResult<{}>>($.sync`${'unicorns'}`);55expectType<SyncResult<{}>>($.sync`unicorns ${'foo'}`);56expectType<SyncResult<{}>>($.sync`unicorns ${'foo'} ${'bar'}`);57expectType<SyncResult<{}>>($.sync`unicorns ${1}`);58expectType<SyncResult<{}>>($.sync`unicorns ${stringArray}`);59expectType<SyncResult<{}>>($.sync`unicorns ${[1, 2]}`);60expectType<SyncResult<{}>>($.sync`unicorns ${false.toString()}`);61expectError($.sync`unicorns ${false}`);6263expectType<ExecaSyncResult<{}>>($.sync`unicorns ${$.sync`echo foo`}`);64expectType<ExecaSyncResult<{}>>($.sync`unicorns ${[$.sync`echo foo`, 'bar']}`);63expectType<SyncResult<{}>>($.sync`unicorns ${$.sync`echo foo`}`);64expectType<SyncResult<{}>>($.sync`unicorns ${[$.sync`echo foo`, 'bar']}`);
modified:test-d/methods/script.test-d.ts+21 added-21 removed
1import {expectType, expectError, expectAssignable} from 'tsd';2import {$, type ExecaResult, type ExecaResultPromise} from '../../index.js';2import {$, type Result, type ResultPromise} from '../../index.js';34const fileUrl = new URL('file:///test');5const stringArray = ['foo', 'bar'] as const;67expectError($());8expectError($(true));9expectError($(['unicorns', 'arg']));10expectAssignable<ExecaResultPromise>($('unicorns'));11expectAssignable<ExecaResultPromise>($(fileUrl));10expectAssignable<ResultPromise>($('unicorns'));11expectAssignable<ResultPromise>($(fileUrl));1213expectAssignable<ExecaResultPromise>($('unicorns', []));14expectAssignable<ExecaResultPromise>($('unicorns', ['foo']));13expectAssignable<ResultPromise>($('unicorns', []));14expectAssignable<ResultPromise>($('unicorns', ['foo']));15expectError($('unicorns', 'foo'));16expectError($('unicorns', [true]));1718expectAssignable<ExecaResultPromise>($('unicorns', {}));19expectAssignable<ExecaResultPromise>($('unicorns', [], {}));18expectAssignable<ResultPromise>($('unicorns', {}));19expectAssignable<ResultPromise>($('unicorns', [], {}));20expectError($('unicorns', [], []));21expectError($('unicorns', {other: true}));2223expectAssignable<ExecaResultPromise>($`unicorns`);24expectType<ExecaResult<{}>>(await $('unicorns'));25expectType<ExecaResult<{}>>(await $`unicorns`);23expectAssignable<ResultPromise>($`unicorns`);24expectType<Result<{}>>(await $('unicorns'));25expectType<Result<{}>>(await $`unicorns`);2627expectAssignable<typeof $>($({}));28expectAssignable<ExecaResultPromise>($({})('unicorns'));29expectAssignable<ExecaResultPromise>($({})`unicorns`);28expectAssignable<ResultPromise>($({})('unicorns'));29expectAssignable<ResultPromise>($({})`unicorns`);3031expectAssignable<{stdout: string}>(await $('unicorns'));32expectAssignable<{stdout: Uint8Array}>(await $('unicorns', {encoding: 'buffer'}));33expectAssignable<{stdout: string}>(await $('unicorns', ['foo']));
6 unmodified lines
40expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})`unicorns`);41expectAssignable<{stdout: Uint8Array}>(await $({})({encoding: 'buffer'})`unicorns`);42expectAssignable<{stdout: Uint8Array}>(await $({encoding: 'buffer'})({})`unicorns`);4344expectType<ExecaResult<{}>>(await $`${'unicorns'}`);45expectType<ExecaResult<{}>>(await $`unicorns ${'foo'}`);46expectType<ExecaResult<{}>>(await $`unicorns ${'foo'} ${'bar'}`);47expectType<ExecaResult<{}>>(await $`unicorns ${1}`);48expectType<ExecaResult<{}>>(await $`unicorns ${stringArray}`);49expectType<ExecaResult<{}>>(await $`unicorns ${[1, 2]}`);50expectType<ExecaResult<{}>>(await $`unicorns ${false.toString()}`);44expectType<Result<{}>>(await $`${'unicorns'}`);45expectType<Result<{}>>(await $`unicorns ${'foo'}`);46expectType<Result<{}>>(await $`unicorns ${'foo'} ${'bar'}`);47expectType<Result<{}>>(await $`unicorns ${1}`);48expectType<Result<{}>>(await $`unicorns ${stringArray}`);49expectType<Result<{}>>(await $`unicorns ${[1, 2]}`);50expectType<Result<{}>>(await $`unicorns ${false.toString()}`);51expectError(await $`unicorns ${false}`);5253expectType<ExecaResult<{}>>(await $`unicorns ${await $`echo foo`}`);53expectType<Result<{}>>(await $`unicorns ${await $`echo foo`}`);54expectError(await $`unicorns ${$`echo foo`}`);55expectType<ExecaResult<{}>>(await $`unicorns ${[await $`echo foo`, 'bar']}`);55expectType<Result<{}>>(await $`unicorns ${[await $`echo foo`, 'bar']}`);56expectError(await $`unicorns ${[$`echo foo`, 'bar']}`);
modified:test-d/return/result-main.test-d.ts+14 added-14 removed
2 unmodified lines
3 execa,4 execaSync,5 ExecaError,6 ExecaSyncError,7 type ExecaResult,8 type ExecaSyncResult,7 type Result,8 type SyncResult,9} from '../../index.js';1011type AnyChunk = string | Uint8Array | string[] | unknown[] | undefined;12expectType<AnyChunk>({} as ExecaResult['stdout']);13expectType<AnyChunk>({} as ExecaResult['stderr']);14expectType<AnyChunk>({} as ExecaResult['all']);15expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as ExecaResult['stdio']);16expectType<AnyChunk>({} as ExecaSyncResult['stdout']);17expectType<AnyChunk>({} as ExecaSyncResult['stderr']);18expectType<AnyChunk>({} as ExecaSyncResult['all']);19expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as ExecaSyncResult['stdio']);12expectType<AnyChunk>({} as Result['stdout']);13expectType<AnyChunk>({} as Result['stderr']);14expectType<AnyChunk>({} as Result['all']);15expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as Result['stdio']);16expectType<AnyChunk>({} as SyncResult['stdout']);17expectType<AnyChunk>({} as SyncResult['stderr']);18expectType<AnyChunk>({} as SyncResult['all']);19expectAssignable<[undefined, AnyChunk, AnyChunk, ...AnyChunk[]]>({} as SyncResult['stdio']);2021const unicornsResult = await execa('unicorns', {all: true});22expectAssignable<ExecaResult>(unicornsResult);22expectAssignable<Result>(unicornsResult);23expectType<string>(unicornsResult.command);24expectType<string>(unicornsResult.escapedCommand);25expectType<number | undefined>(unicornsResult.exitCode);26expectType<boolean>(unicornsResult.failed);
4 unmodified lines
31expectType<string | undefined>(unicornsResult.signal);32expectType<string | undefined>(unicornsResult.signalDescription);33expectType<string>(unicornsResult.cwd);34expectType<number>(unicornsResult.durationMs);35expectType<ExecaResult[]>(unicornsResult.pipedFrom);35expectType<Result[]>(unicornsResult.pipedFrom);3637const unicornsResultSync = execaSync('unicorns', {all: true});38expectAssignable<ExecaSyncResult>(unicornsResultSync);38expectAssignable<SyncResult>(unicornsResultSync);39expectType<string>(unicornsResultSync.command);40expectType<string>(unicornsResultSync.escapedCommand);41expectType<number | undefined>(unicornsResultSync.exitCode);42expectType<boolean>(unicornsResultSync.failed);
25 unmodified lines
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);72 expectType<Result[]>(error.pipedFrom);73}7475const errorSync = new Error('.');76if (errorSync instanceof ExecaSyncError) {
19 unmodified lines
modified:test-d/subprocess/stdio.test-d.ts+5 added-5 removed
1import type {Readable, Writable} from 'node:stream';2import {expectType, expectError} from 'tsd';3import {execa, type ExecaSubprocess} from '../../index.js';3import {execa, type Subprocess} from '../../index.js';45expectType<Writable | null>({} as ExecaSubprocess['stdin']);6expectType<Readable | null>({} as ExecaSubprocess['stdout']);7expectType<Readable | null>({} as ExecaSubprocess['stderr']);8expectType<Readable | undefined>({} as ExecaSubprocess['all']);5expectType<Writable | null>({} as Subprocess['stdin']);6expectType<Readable | null>({} as Subprocess['stdout']);7expectType<Readable | null>({} as Subprocess['stderr']);8expectType<Readable | undefined>({} as Subprocess['all']);910const bufferSubprocess = execa('unicorns', {encoding: 'buffer', all: true});11expectType<Writable>(bufferSubprocess.stdin);12expectType<Writable>(bufferSubprocess.stdio[0]);
29 unmodified lines
modified:test-d/subprocess/subprocess.test-d.ts+3 added-3 removed
1import {expectType, expectError, expectAssignable} from 'tsd';2import {execa, type ExecaSubprocess} from '../../index.js';2import {execa, type Subprocess} from '../../index.js';34const subprocess = execa('unicorns');5expectAssignable<ExecaSubprocess>(subprocess);5expectAssignable<Subprocess>(subprocess);67expectType<number | undefined>(subprocess.pid);89expectType<boolean>(subprocess.kill());
10 unmodified lines
20expectError(subprocess.kill('SIGKILL', {}));21expectError(subprocess.kill(null, new Error('test')));2223const ipcSubprocess = execa('unicorns', {ipc: true});24expectAssignable<ExecaSubprocess>(subprocess);24expectAssignable<Subprocess>(subprocess);2526expectType<boolean>(ipcSubprocess.send({}));27execa('unicorns', {stdio: ['pipe', 'pipe', 'pipe', 'ipc']}).send({});28execa('unicorns', {stdio: ['pipe', 'pipe', 'ipc', 'pipe']}).send({});
6 unmodified lines
modified:test-d/pipe.test-d.ts+3 added-3 removed
2 unmodified lines
3import {4 execa,5 execaSync,6 $,7 type ExecaResult,7 type Result,8} from '../index.js';910const fileUrl = new URL('file:///test');11const stringArray = ['foo', 'bar'] as const;
4 unmodified lines
16const scriptSubprocess = $`unicorns`;1718const bufferResult = await bufferSubprocess;19type BufferExecaReturnValue = typeof bufferResult;20type EmptyExecaReturnValue = ExecaResult<{}>;21type ShortcutExecaReturnValue = ExecaResult<typeof pipeOptions>;20type EmptyExecaReturnValue = Result<{}>;21type ShortcutExecaReturnValue = Result<typeof pipeOptions>;2223expectNotType<BufferExecaReturnValue>(await subprocess.pipe(subprocess));24expectNotType<BufferExecaReturnValue>(await scriptSubprocess.pipe(subprocess));25expectType<BufferExecaReturnValue>(await subprocess.pipe(bufferSubprocess));
229 unmodified lines
modified:types/methods/command.d.ts+8 added-8 removed
1import type {Options, SyncOptions} from '../arguments/options';2import type {ExecaSyncResult} from '../return/result';3import type {ExecaResultPromise} from '../subprocess/subprocess';2import type {SyncResult} from '../return/result';3import type {ResultPromise} from '../subprocess/subprocess';4import type {SimpleTemplateString} from './template';56type ExecaCommand<OptionsType extends Options> = {7 <NewOptionsType extends Options = {}>(options: NewOptionsType): ExecaCommand<OptionsType & NewOptionsType>;89 (...templateString: SimpleTemplateString): ExecaResultPromise<OptionsType>;9 (...templateString: SimpleTemplateString): ResultPromise<OptionsType>;1011 <NewOptionsType extends Options = {}>(12 command: string,13 options?: NewOptionsType,14 ): ExecaResultPromise<OptionsType & NewOptionsType>;14 ): ResultPromise<OptionsType & NewOptionsType>;15};1617/**18Executes a command. `command` is a string that includes both the `file` and its `arguments`.
2 unmodified lines
2122Just like `execa()`, this can bind options. It can also be run synchronously using `execaCommandSync()`.2324@param command - The program/script to execute and its arguments.25@returns An `ExecaResultPromise` that is both:25@returns A `ResultPromise` that is both:26- the subprocess.27- a `Promise` either resolving with its successful `result`, or rejecting with its `error`.28@throws `ExecaError`29
10 unmodified lines
4041type ExecaCommandSync<OptionsType extends SyncOptions> = {42 <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaCommandSync<OptionsType & NewOptionsType>;4344 (...templateString: SimpleTemplateString): ExecaSyncResult<OptionsType>;44 (...templateString: SimpleTemplateString): SyncResult<OptionsType>;4546 <NewOptionsType extends SyncOptions = {}>(47 command: string,48 options?: NewOptionsType,49 ): ExecaSyncResult<OptionsType & NewOptionsType>;49 ): SyncResult<OptionsType & NewOptionsType>;50};5152/**53Same as `execaCommand()` but synchronous.5455Returns or throws a subprocess `result`. The `subprocess` is not returned: its methods and properties are not available.5657@param command - The program/script to execute and its arguments.58@returns `ExecaSyncResult`58@returns `SyncResult`59@throws `ExecaSyncError`6061@example62```
8 unmodified lines
modified:types/methods/main-async.d.ts+5 added-5 removed
1import type {Options} from '../arguments/options';2import type {ExecaResultPromise} from '../subprocess/subprocess';2import type {ResultPromise} from '../subprocess/subprocess';3import type {TemplateString} from './template';45type Execa<OptionsType extends Options> = {6 <NewOptionsType extends Options = {}>(options: NewOptionsType): Execa<OptionsType & NewOptionsType>;78 (...templateString: TemplateString): ExecaResultPromise<OptionsType>;8 (...templateString: TemplateString): ResultPromise<OptionsType>;910 <NewOptionsType extends Options = {}>(11 file: string | URL,12 arguments?: readonly string[],13 options?: NewOptionsType,14 ): ExecaResultPromise<OptionsType & NewOptionsType>;14 ): ResultPromise<OptionsType & NewOptionsType>;1516 <NewOptionsType extends Options = {}>(17 file: string | URL,18 options?: NewOptionsType,19 ): ExecaResultPromise<OptionsType & NewOptionsType>;19 ): ResultPromise<OptionsType & NewOptionsType>;20};2122/**23Executes a command using `file ...arguments`.
3 unmodified lines
27`execa(options)` can be used to return a new instance of Execa but with different default `options`. Consecutive calls are merged to previous ones.2829@param file - The program/script to execute, as a string or file URL30@param arguments - Arguments to pass to `file` on execution.31@returns An `ExecaResultPromise` that is both:31@returns A `ResultPromise` that is both:32- the subprocess.33- a `Promise` either resolving with its successful `result`, or rejecting with its `error`.34@throws `ExecaError`35
207 unmodified lines
modified:types/methods/main-sync.d.ts+5 added-5 removed
1import type {SyncOptions} from '../arguments/options';2import type {ExecaSyncResult} from '../return/result';2import type {SyncResult} from '../return/result';3import type {TemplateString} from './template';45type ExecaSync<OptionsType extends SyncOptions> = {6 <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaSync<OptionsType & NewOptionsType>;78 (...templateString: TemplateString): ExecaSyncResult<OptionsType>;8 (...templateString: TemplateString): SyncResult<OptionsType>;910 <NewOptionsType extends SyncOptions = {}>(11 file: string | URL,12 arguments?: readonly string[],13 options?: NewOptionsType,14 ): ExecaSyncResult<OptionsType & NewOptionsType>;14 ): SyncResult<OptionsType & NewOptionsType>;1516 <NewOptionsType extends SyncOptions = {}>(17 file: string | URL,18 options?: NewOptionsType,19 ): ExecaSyncResult<OptionsType & NewOptionsType>;19 ): SyncResult<OptionsType & NewOptionsType>;20};2122/**23Same as `execa()` but synchronous.
1 unmodified line
25Returns or throws a subprocess `result`. The `subprocess` is not returned: its methods and properties are not available.2627@param file - The program/script to execute, as a string or file URL28@param arguments - Arguments to pass to `file` on execution.29@returns `ExecaSyncResult`29@returns `SyncResult`30@throws `ExecaSyncError`3132@example33
9 unmodified lines
modified:types/methods/node.d.ts+5 added-5 removed
1import type {Options} from '../arguments/options';2import type {ExecaResultPromise} from '../subprocess/subprocess';2import type {ResultPromise} from '../subprocess/subprocess';3import type {TemplateString} from './template';45type ExecaNode<OptionsType extends Options> = {6 <NewOptionsType extends Options = {}>(options: NewOptionsType): ExecaNode<OptionsType & NewOptionsType>;78 (...templateString: TemplateString): ExecaResultPromise<OptionsType>;8 (...templateString: TemplateString): ResultPromise<OptionsType>;910 <NewOptionsType extends Options = {}>(11 scriptPath: string | URL,12 arguments?: readonly string[],13 options?: NewOptionsType,14 ): ExecaResultPromise<OptionsType & NewOptionsType>;14 ): ResultPromise<OptionsType & NewOptionsType>;1516 <NewOptionsType extends Options = {}>(17 scriptPath: string | URL,18 options?: NewOptionsType,19 ): ExecaResultPromise<OptionsType & NewOptionsType>;19 ): ResultPromise<OptionsType & NewOptionsType>;20};2122/**23Same as `execa()` but using the `node: true` option.
4 unmodified lines
28This is the preferred method when executing Node.js files.2930@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 `ExecaResultPromise` that is both:32@returns A `ResultPromise` that is both:33- the subprocess.34- a `Promise` either resolving with its successful `result`, or rejecting with its `error`.35@throws `ExecaError`36
12 unmodified lines
modified:types/methods/script.d.ts+9 added-9 removed
2 unmodified lines
3 Options,4 SyncOptions,5 StricterOptions,6} from '../arguments/options';7import type {ExecaSyncResult} from '../return/result';8import type {ExecaResultPromise} from '../subprocess/subprocess';7import type {SyncResult} from '../return/result';8import type {ResultPromise} from '../subprocess/subprocess';9import type {TemplateString} from './template';1011type ExecaScriptCommon<OptionsType extends CommonOptions> = {12 <NewOptionsType extends CommonOptions = {}>(options: NewOptionsType): ExecaScript<OptionsType & NewOptionsType>;1314 (...templateString: TemplateString): ExecaResultPromise<StricterOptions<OptionsType, Options>>;14 (...templateString: TemplateString): ResultPromise<StricterOptions<OptionsType, Options>>;1516 <NewOptionsType extends Options = {}>(17 file: string | URL,18 arguments?: readonly string[],19 options?: NewOptionsType,20 ): ExecaResultPromise<StricterOptions<OptionsType & NewOptionsType, Options>>;20 ): ResultPromise<StricterOptions<OptionsType & NewOptionsType, Options>>;2122 <NewOptionsType extends Options = {}>(23 file: string | URL,24 options?: NewOptionsType,25 ): ExecaResultPromise<StricterOptions<OptionsType & NewOptionsType, Options>>;25 ): ResultPromise<StricterOptions<OptionsType & NewOptionsType, Options>>;26};2728type ExecaScriptSync<OptionsType extends CommonOptions> = {29 <NewOptionsType extends SyncOptions = {}>(options: NewOptionsType): ExecaScriptSync<OptionsType & NewOptionsType>;3031 (...templateString: TemplateString): ExecaSyncResult<StricterOptions<OptionsType, SyncOptions>>;31 (...templateString: TemplateString): SyncResult<StricterOptions<OptionsType, SyncOptions>>;3233 <NewOptionsType extends SyncOptions = {}>(34 file: string | URL,35 arguments?: readonly string[],36 options?: NewOptionsType,37 ): ExecaSyncResult<StricterOptions<OptionsType & NewOptionsType, SyncOptions>>;37 ): SyncResult<StricterOptions<OptionsType & NewOptionsType, SyncOptions>>;3839 <NewOptionsType extends SyncOptions = {}>(40 file: string | URL,41 options?: NewOptionsType,42 ): ExecaSyncResult<StricterOptions<OptionsType & NewOptionsType, SyncOptions>>;42 ): SyncResult<StricterOptions<OptionsType & NewOptionsType, SyncOptions>>;43};4445type ExecaScript<OptionsType extends CommonOptions> = {46 sync: ExecaScriptSync<OptionsType>;
6 unmodified lines
53Just like `execa()`, this can use the template string syntax or bind options. It can also be run synchronously using `$.sync()` or `$.s()`.5455This is the preferred method when executing multiple commands in a script file.5657@returns An `ExecaResultPromise` that is both:57@returns A `ResultPromise` that is both:58- the subprocess.59- a `Promise` either resolving with its successful `result`, or rejecting with its `error`.60@throws `ExecaError`61
29 unmodified lines
modified:types/return/result.d.ts+3 added-3 removed
50 unmodified lines
51 Results of the other subprocesses that were piped into this subprocess.5253 This array is initially empty and is populated each time the `subprocess.pipe()` method resolves.54 */55 pipedFrom: Unless<IsSync, ExecaResult[], []>;55 pipedFrom: Unless<IsSync, Result[], []>;5657 /**58 The file and arguments that were run.59 */
118 unmodified lines
178Result of a subprocess successful execution.179180When the subprocess fails, it is rejected with an `ExecaError` instead.181*/182export type ExecaResult<OptionsType extends Options = Options> = SuccessResult<false, OptionsType>;182export type Result<OptionsType extends Options = Options> = SuccessResult<false, OptionsType>;183184/**185Result of a subprocess successful execution.186187When the subprocess fails, it is rejected with an `ExecaError` instead.188*/189export type ExecaSyncResult<OptionsType extends SyncOptions = SyncOptions> = SuccessResult<true, OptionsType>;189export type SyncResult<OptionsType extends SyncOptions = SyncOptions> = SuccessResult<true, OptionsType>;
modified:types/subprocess/subprocess.d.ts+5 added-5 removed
1import type {ChildProcess} from 'node:child_process';2import type {Readable, Writable, Duplex} from 'node:stream';3import type {StdioOptionsArray} from '../stdio/type';4import type {Options} from '../arguments/options';5import type {ExecaResult} from '../return/result';5import type {Result} from '../return/result';6import type {PipableSubprocess} from '../pipe';7import type {8 ReadableOptions,9 WritableOptions,
107 unmodified lines
117118/**119[`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess) with additional methods and properties.120*/121export type ExecaSubprocess<OptionsType extends Options = Options> =121export type Subprocess<OptionsType extends Options = Options> =122 & Omit<ChildProcess, keyof ExecaCustomSubprocess<OptionsType>>123 & ExecaCustomSubprocess<OptionsType>;124125/**126The return value of all asynchronous methods is both:127- the subprocess.128- a `Promise` either resolving with its successful `result`, or rejecting with its `error`.129*/130export type ExecaResultPromise<OptionsType extends Options = Options> =131 & ExecaSubprocess<OptionsType>132 & Promise<ExecaResult<OptionsType>>;130export type ResultPromise<OptionsType extends Options = Options> =131 & Subprocess<OptionsType>132 & Promise<Result<OptionsType>>;
modified:types/pipe.d.ts+7 added-7 removed
1import type {Options} from './arguments/options';2import type {ExecaResult} from './return/result';2import type {Result} from './return/result';3import type {FromOption, ToOption} from './arguments/fd-options';4import type {ExecaResultPromise} from './subprocess/subprocess';4import type {ResultPromise} from './subprocess/subprocess';5import type {TemplateExpression} from './methods/template';67// `subprocess.pipe()` options8type PipeOptions = {
25 unmodified lines
34 pipe<OptionsType extends Options & PipeOptions = {}>(35 file: string | URL,36 arguments?: readonly string[],37 options?: OptionsType,38 ): Promise<ExecaResult<OptionsType>> & PipableSubprocess;38 ): Promise<Result<OptionsType>> & PipableSubprocess;39 pipe<OptionsType extends Options & PipeOptions = {}>(40 file: string | URL,41 options?: OptionsType,42 ): Promise<ExecaResult<OptionsType>> & PipableSubprocess;42 ): Promise<Result<OptionsType>> & PipableSubprocess;4344 /**45 Like `subprocess.pipe(file, arguments?, options?)` but using a `command` template string instead. This follows the same syntax as `$`.46 */47 pipe(templates: TemplateStringsArray, ...expressions: readonly TemplateExpression[]):48 Promise<ExecaResult<{}>> & PipableSubprocess;48 Promise<Result<{}>> & PipableSubprocess;49 pipe<OptionsType extends Options & PipeOptions = {}>(options: OptionsType):50 (templates: TemplateStringsArray, ...expressions: readonly TemplateExpression[])51 => Promise<ExecaResult<OptionsType>> & PipableSubprocess;51 => Promise<Result<OptionsType>> & PipableSubprocess;5253 /**54 Like `subprocess.pipe(file, arguments?, options?)` but using the return value of another `execa()` call instead.55 */56 pipe<Destination extends ExecaResultPromise>(destination: Destination, options?: PipeOptions):56 pipe<Destination extends ResultPromise>(destination: Destination, options?: PipeOptions):57 Promise<Awaited<Destination>> & PipableSubprocess;58};
modified:index.d.ts+2 added-2 removed
3 unmodified lines
4 StdoutStderrOption,5 StdoutStderrOptionSync,6} from './types/stdio/type';7export type {Options, SyncOptions} from './types/arguments/options';8export type {ExecaResult, ExecaSyncResult} from './types/return/result';9export type {ExecaResultPromise, ExecaSubprocess} from './types/subprocess/subprocess';8export type {Result, SyncResult} from './types/return/result';9export type {ResultPromise, Subprocess} from './types/subprocess/subprocess';10/* eslint-disable import/extensions */11export {ExecaError, ExecaSyncError} from './types/return/final-error';12export {execa} from './types/methods/main-async';13export {execaSync} from './types/methods/main-sync';
4 unmodified lines