Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions types/arguments/encoding-option.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ export type EncodingOption =
| TextEncodingOption
| BinaryEncodingOption
| undefined;

export {};
2 changes: 2 additions & 0 deletions types/arguments/fd-options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ export type FromOption = 'stdout' | 'stderr' | 'all' | FileDescriptorOption;

// `to` option of `subprocess.writable|duplex|pipe()`
export type ToOption = 'stdin' | FileDescriptorOption;

export {};
2 changes: 2 additions & 0 deletions types/arguments/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,3 +398,5 @@ export type StricterOptions<
WideOptions extends CommonOptions,
StrictOptions extends CommonOptions,
> = WideOptions extends StrictOptions ? WideOptions : StrictOptions;

export {};
2 changes: 2 additions & 0 deletions types/arguments/specific.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ type FdNumberToFromOption<
: 'ipc' extends GenericOptionKeys
? 'ipc'
: never;

export {};
2 changes: 2 additions & 0 deletions types/convert.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ EncodingOption extends BinaryEncodingOption
? Uint8Array
: string
>;

export {};
2 changes: 2 additions & 0 deletions types/ipc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,5 @@ type HasIpcOption<
? true
: false
: true;

export {};
2 changes: 2 additions & 0 deletions types/methods/command.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,5 @@ await execa(file, commandArguments);
```
*/
export function parseCommandString(command: string): string[];

export {};
2 changes: 2 additions & 0 deletions types/methods/main-async.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,3 +377,5 @@ type ExecaArrayLong<OptionsType extends Options> =
type ExecaArrayShort<OptionsType extends Options> =
<NewOptionsType extends Options = {}>(file: string | URL, options?: NewOptionsType)
=> ResultPromise<OptionsType & NewOptionsType>;

export {};
2 changes: 2 additions & 0 deletions types/methods/main-sync.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ type ExecaSyncArrayLong<OptionsType extends SyncOptions> =
type ExecaSyncArrayShort<OptionsType extends SyncOptions> =
<NewOptionsType extends SyncOptions = {}>(file: string | URL, options?: NewOptionsType)
=> SyncResult<OptionsType & NewOptionsType>;

export {};
2 changes: 2 additions & 0 deletions types/methods/node.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ type ExecaNodeArrayLong<OptionsType extends Options> =
type ExecaNodeArrayShort<OptionsType extends Options> =
<NewOptionsType extends Options = {}>(scriptPath: string | URL, options?: NewOptionsType)
=> ResultPromise<OptionsType & NewOptionsType>;

export {};
2 changes: 2 additions & 0 deletions types/methods/script.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ type ExecaScriptSyncArrayLong<OptionsType extends CommonOptions> =
type ExecaScriptSyncArrayShort<OptionsType extends CommonOptions> =
<NewOptionsType extends SyncOptions = {}>(file: string | URL, options?: NewOptionsType)
=> SyncResult<StricterOptions<OptionsType & NewOptionsType, SyncOptions>>;

export {};
2 changes: 2 additions & 0 deletions types/methods/template.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ export type TemplateString = readonly [TemplateStringsArray, ...readonly Templat

// `...${...}...` template syntax, but only allowing a single argument, for `execaCommand()`
export type SimpleTemplateString = readonly [TemplateStringsArray, string?];

export {};
2 changes: 2 additions & 0 deletions types/pipe.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ export type PipableSubprocess = {
pipe<Destination extends ResultPromise>(destination: Destination, options?: PipeOptions):
Promise<Awaited<Destination>> & PipableSubprocess;
};

export {};
2 changes: 2 additions & 0 deletions types/return/final-error.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ This has the same shape as successful results, with a few additional properties.
export class ExecaSyncError<OptionsType extends SyncOptions = SyncOptions> extends CommonError<true, OptionsType> {
readonly name: 'ExecaSyncError';
}

export {};
2 changes: 2 additions & 0 deletions types/return/ignore.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ type IgnoresOutput<
FdNumber extends string,
StdioOptionType,
> = StdioOptionType extends NoStreamStdioOption<FdNumber> ? true : false;

export {};
2 changes: 2 additions & 0 deletions types/return/result-all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ type AllObjectFd<OptionsType extends CommonOptions> =

type AllLinesFd<OptionsType extends CommonOptions> =
FdSpecificOption<OptionsType['lines'], '1'> extends true ? '1' : '2';

export {};
2 changes: 2 additions & 0 deletions types/return/result-ipc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ type ResultIpcAsync<
: IpcEnabled extends true
? Array<Message<SerializationOption>>
: [];

export {};
2 changes: 2 additions & 0 deletions types/return/result-stdio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ type MapResultStdio<
OptionsType
>
};

export {};
2 changes: 2 additions & 0 deletions types/return/result-stdout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ type ResultStdioItem<
? string
: string[]
: string;

export {};
2 changes: 2 additions & 0 deletions types/return/result.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,5 @@ Result of a subprocess successful execution.
When the subprocess fails, it is rejected with an `ExecaError` instead.
*/
export type SyncResult<OptionsType extends SyncOptions = SyncOptions> = SuccessResult<true, OptionsType>;

export {};
2 changes: 2 additions & 0 deletions types/stdio/array.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ type StdioOptionNormalized<StdioOption extends CommonOptions['stdio']> = StdioOp

// `options.stdio` default value
type DefaultStdioOption = readonly ['pipe', 'pipe', 'pipe'];

export {};
2 changes: 2 additions & 0 deletions types/stdio/direction.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ export type IsInputFd<
> = FdNumber extends '0'
? true
: Intersects<StdioSingleOptionItems<FdStdioArrayOption<FdNumber, OptionsType>>, InputStdioOption>;

export {};
2 changes: 2 additions & 0 deletions types/stdio/option.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ type FdStdioArrayOptionProperty<
? StdioOptionsType[number]
: undefined
: undefined;

export {};
2 changes: 2 additions & 0 deletions types/stdio/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,5 @@ export type StdioOptionsArray<IsSync extends boolean = boolean> = readonly [
export type StdioOptionsProperty<IsSync extends boolean = boolean> =
| SimpleStdioOption<IsSync, false, false>
| StdioOptionsArray<IsSync>;

export {};
2 changes: 2 additions & 0 deletions types/subprocess/all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ type AllIgnored<
? IgnoresSubprocessOutput<'2', OptionsType>
: false
: true;

export {};
2 changes: 2 additions & 0 deletions types/subprocess/stdio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ type MapStdioStreams<
'3' extends keyof StdioOptionsArrayType ? SubprocessStdioStream<'3', OptionsType> : never,
'4' extends keyof StdioOptionsArrayType ? SubprocessStdioStream<'4', OptionsType> : never,
];

export {};
2 changes: 2 additions & 0 deletions types/subprocess/stdout.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ type SubprocessStream<
type InputOutputStream<IsInput extends boolean> = IsInput extends true
? Writable
: Readable;

export {};
2 changes: 2 additions & 0 deletions types/subprocess/subprocess.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ The return value of all asynchronous methods is both:
export type ResultPromise<OptionsType extends Options = Options> =
& Subprocess<OptionsType>
& Promise<Result<OptionsType>>;

export {};
2 changes: 2 additions & 0 deletions types/transform/normalize.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ export type DuplexTransform = {
export type WebTransform = {
readonly transform: TransformStream;
} & TransformCommon;

export {};
2 changes: 2 additions & 0 deletions types/transform/object-mode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ type IsObjectStdioSingleOption<StdioSingleOptionType> = StdioSingleOptionType ex
: false;

type BooleanObjectMode<ObjectModeOption extends boolean | undefined> = ObjectModeOption extends true ? true : false;

export {};
2 changes: 2 additions & 0 deletions types/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ export type AndUnless<Condition extends boolean, ThenValue, ElseValue = unknown>
// Whether any of T's union element is the same as one of U's union element.
// `&` does not work here.
export type Intersects<T, U> = true extends (T extends U ? true : false) ? true : false;

export {};
2 changes: 2 additions & 0 deletions types/verbose.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@ export type SyncVerboseObject = GenericVerboseObject & {
*/
result?: SyncResult;
};

export {};