@@ -36,11 +36,11 @@ export type IgnoreFunction = (
3636 arg : string ,
3737) => boolean ;
3838
39- export type FlagType < T = unknown > =
39+ export type TypeValue < T = unknown > =
4040 | TypeFunction < T >
4141 | readonly [ TypeFunction < T > ] ;
4242
43- export interface BaseFlagOptions < T extends FlagType = FlagType > {
43+ export interface BaseFlagOptions < T extends TypeValue = TypeValue > {
4444 /**
4545 * The type constructor or a function to convert the string value.
4646 * To support multiple occurrences of a flag (e.g., --file a --file b), wrap the type in an array: [String], [Number].
@@ -68,7 +68,7 @@ export type FlagOptions =
6868 | ( BaseFlagOptions & {
6969 negatable ?: never ;
7070 } ) ;
71- export type FlagDefinitionValue = FlagOptions | FlagType ;
71+ export type FlagDefinitionValue = FlagOptions | TypeValue ;
7272export type FlagsDefinition = Record < string , FlagDefinitionValue > ;
7373
7474/**
@@ -148,10 +148,10 @@ type _InferFlags<T extends FlagsDefinition> = {
148148 : T [ K ] extends ObjectConstructor | { type : ObjectConstructor }
149149 ? ObjectInputType | InferFlagDefault < T [ K ] , never >
150150 : T [ K ] extends
151- | readonly [ FlagType < infer U > ]
152- | { type : readonly [ FlagType < infer U > ] }
151+ | readonly [ TypeValue < infer U > ]
152+ | { type : readonly [ TypeValue < infer U > ] }
153153 ? U [ ] | InferFlagDefault < T [ K ] , never >
154- : T [ K ] extends FlagType < infer U > | { type : FlagType < infer U > }
154+ : T [ K ] extends TypeValue < infer U > | { type : TypeValue < infer U > }
155155 ?
156156 | U
157157 | InferFlagDefault <
0 commit comments