Skip to content
Myr

Fix complexity bug with types (#1037)

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

authored by ehmicky · committed by GitHub · parent 398d090 · Browse files · 4 files+20 added−18 removed
This commit

State

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

Diff stats

4 files+20 added−18 removed

  • other:+20 added−18 removed

4 files+20 added−18 removed

modified:types/stdio/direction.d.ts+3 added-9 removed
modified:types/stdio/type.d.ts+11 added-4 removed
modified:types/transform/object-mode.d.ts+2 added-5 removed
1import type {StdioSingleOption, StdioOptionCommon} from '../stdio/type.js';1import type {StdioSingleOption, StdioOptionCommon, StdioSingleOptionItems} from '../stdio/type.js';2import type {FdStdioOption} from '../stdio/option.js';3import type {CommonOptions} from '../arguments/options.js';4import type {DuplexTransform} from './normalize.js';5
3 unmodified lines
9 FdNumber extends string,10 OptionsType extends CommonOptions = CommonOptions,11> = IsObjectStdioOption<FdStdioOption<FdNumber, OptionsType>>;1213type IsObjectStdioOption<StdioOptionType extends StdioOptionCommon> = IsObjectStdioSingleOption<StdioOptionType extends readonly StdioSingleOption[]14 ? StdioOptionType[number]15 : StdioOptionType16>;13type IsObjectStdioOption<StdioOptionType extends StdioOptionCommon> = IsObjectStdioSingleOption<StdioSingleOptionItems<StdioOptionType>>;1415type IsObjectStdioSingleOption<StdioSingleOptionType extends StdioSingleOption> = StdioSingleOptionType extends {objectMode?: boolean}16 ? BooleanObjectMode<StdioSingleOptionType['objectMode']>17 : StdioSingleOptionType extends DuplexTransform
4 unmodified lines
modified:types/utils.d.ts+4 added