Skip to content
Myr

Ensure all `d.ts` files are considered as ESM (#1216)

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

authored by Sindre Sorhus · committed by GitHub · parent 84e1f36 · Browse files · 32 files+64 added−0 removed
This commit

State

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

Diff stats

32 files+64 added−0 removed

  • other:+64 added−0 removed

32 files+64 added−0 removed

modified:types/arguments/encoding-option.d.ts+2 added
modified:types/arguments/fd-options.d.ts+2 added
modified:types/arguments/options.d.ts+2 added
396 unmodified lines
397export type StricterOptions<398 WideOptions extends CommonOptions,399 StrictOptions extends CommonOptions,400> = WideOptions extends StrictOptions ? WideOptions : StrictOptions;401402export {};
modified:types/arguments/specific.d.ts+2 added
modified:types/methods/command.d.ts+2 added
110 unmodified lines
111await execa(file, commandArguments);112```113*/114export function parseCommandString(command: string): string[];115116export {};
modified:types/methods/main-async.d.ts+2 added
375 unmodified lines
376// `execa('file', {})` array syntax377type ExecaArrayShort<OptionsType extends Options> =378 <NewOptionsType extends Options = {}>(file: string | URL, options?: NewOptionsType)379 => ResultPromise<OptionsType & NewOptionsType>;380381export {};
modified:types/methods/main-sync.d.ts+2 added
modified:types/methods/node.d.ts+2 added
58 unmodified lines
59// `execaNode('script', {})` array syntax60type ExecaNodeArrayShort<OptionsType extends Options> =61 <NewOptionsType extends Options = {}>(scriptPath: string | URL, options?: NewOptionsType)62 => ResultPromise<OptionsType & NewOptionsType>;6364export {};
modified:types/methods/script.d.ts+2 added
111 unmodified lines
112// `$.sync('file', {})` array syntax113type ExecaScriptSyncArrayShort<OptionsType extends CommonOptions> =114 <NewOptionsType extends SyncOptions = {}>(file: string | URL, options?: NewOptionsType)115 => SyncResult<StricterOptions<OptionsType & NewOptionsType, SyncOptions>>;116117export {};
modified:types/methods/template.d.ts+2 added
14 unmodified lines
15export type TemplateString = readonly [TemplateStringsArray, ...readonly TemplateExpression[]];1617// `...${...}...` template syntax, but only allowing a single argument, for `execaCommand()`18export type SimpleTemplateString = readonly [TemplateStringsArray, string?];1920export {};
modified:types/return/final-error.d.ts+2 added
47 unmodified lines
48*/49export class ExecaSyncError<OptionsType extends SyncOptions = SyncOptions> extends CommonError<true, OptionsType> {50 readonly name: 'ExecaSyncError';51}5253export {};
modified:types/return/ignore.d.ts+2 added
22 unmodified lines
23type IgnoresOutput<24 FdNumber extends string,25 StdioOptionType,26> = StdioOptionType extends NoStreamStdioOption<FdNumber> ? true : false;2728export {};
modified:types/return/result-all.d.ts+2 added
26 unmodified lines
27 IsObjectFd<'1', OptionsType> extends true ? '1' : '2';2829type AllLinesFd<OptionsType extends CommonOptions> =30 FdSpecificOption<OptionsType['lines'], '1'> extends true ? '1' : '2';3132export {};
modified:types/return/result-ipc.d.ts+2 added
23 unmodified lines
24 ? []25 : IpcEnabled extends true26 ? Array<Message<SerializationOption>>27 : [];2829export {};
modified:types/return/result-stdio.d.ts+2 added
13 unmodified lines
14 FdNumber extends string ? FdNumber : string,15 OptionsType16 >17};1819export {};
modified:types/return/result-stdout.d.ts+2 added
46 unmodified lines
47 ? Encoding extends BinaryEncodingOption48 ? string49 : string[]50 : string;5152export {};
modified:types/return/result.d.ts+2 added
199 unmodified lines
200201When the subprocess fails, it is rejected with an `ExecaError` instead.202*/203export type SyncResult<OptionsType extends SyncOptions = SyncOptions> = SuccessResult<true, OptionsType>;204205export {};
modified:types/stdio/array.d.ts+2 added
12 unmodified lines
13 : DefaultStdioOption;1415// `options.stdio` default value16type DefaultStdioOption = readonly ['pipe', 'pipe', 'pipe'];1718export {};
modified:types/stdio/direction.d.ts+2 added
8 unmodified lines
9 OptionsType extends CommonOptions,10> = FdNumber extends '0'11 ? true12 : Intersects<StdioSingleOptionItems<FdStdioArrayOption<FdNumber, OptionsType>>, InputStdioOption>;1314export {};
modified:types/stdio/option.d.ts+2 added
36 unmodified lines
37 : StdioOptionNormalizedArray<CommonOptions> extends StdioOptionsType38 ? StdioOptionsType[number]39 : undefined40 : undefined;4142export {};
modified:types/stdio/type.d.ts+2 added
166 unmodified lines
167// `options.stdio`168export type StdioOptionsProperty<IsSync extends boolean = boolean> =169 | SimpleStdioOption<IsSync, false, false>170 | StdioOptionsArray<IsSync>;171172export {};
modified:types/subprocess/all.d.ts+2 added
13 unmodified lines
14 ? IgnoresSubprocessOutput<'1', OptionsType> extends true15 ? IgnoresSubprocessOutput<'2', OptionsType>16 : false17 : true;1819export {};
modified:types/subprocess/stdio.d.ts+2 added
14 unmodified lines
15 SubprocessStdioStream<'2', OptionsType>,16 '3' extends keyof StdioOptionsArrayType ? SubprocessStdioStream<'3', OptionsType> : never,17 '4' extends keyof StdioOptionsArrayType ? SubprocessStdioStream<'4', OptionsType> : never,18];1920export {};
modified:types/subprocess/stdout.d.ts+2 added
18 unmodified lines
1920type InputOutputStream<IsInput extends boolean> = IsInput extends true21 ? Writable22 : Readable;2324export {};
modified:types/subprocess/subprocess.d.ts+2 added
113 unmodified lines
114*/115export type ResultPromise<OptionsType extends Options = Options> =116 & Subprocess<OptionsType>117 & Promise<Result<OptionsType>>;118119export {};
modified:types/transform/normalize.d.ts+2 added
53 unmodified lines
54// `options.std*: TransformStream`55export type WebTransform = {56 readonly transform: TransformStream;57} & TransformCommon;5859export {};
modified:types/transform/object-mode.d.ts+2 added
17 unmodified lines
18 ? StdioSingleOptionType['transform']['readableObjectMode']19 : false;2021type BooleanObjectMode<ObjectModeOption extends boolean | undefined> = ObjectModeOption extends true ? true : false;2223export {};
modified:types/convert.d.ts+2 added
54 unmodified lines
55 : BinaryOption extends true56 ? Uint8Array57 : string58>;5960export {};
modified:types/ipc.d.ts+2 added
152 unmodified lines
153 ? GracefulCancelOption extends true154 ? true155 : false156 : true;157158export {};
modified:types/pipe.d.ts+2 added
54 unmodified lines
55 */56 pipe<Destination extends ResultPromise>(destination: Destination, options?: PipeOptions):57 Promise<Awaited<Destination>> & PipableSubprocess;58};5960export {};
modified:types/utils.d.ts+2 added
9 unmodified lines
1011// Whether any of T's union element is the same as one of U's union element.12// `&` does not work here.13export type Intersects<T, U> = true extends (T extends U ? true : false) ? true : false;1415export {};
modified:types/verbose.d.ts+2 added
94 unmodified lines
95 This is `undefined` if `verboseObject.type` is `'command'`, `'output'` or `'ipc'`.96 */97 result?: SyncResult;98};99100export {};