Skip to content

Interface: BaseFlagOptions<T>

Defined in: packages/parser/src/types.ts:39

Type Parameters

T

T extends FlagType = FlagType

Properties

alias?

ts
optional alias: MaybeArray<string>;

Defined in: packages/parser/src/types.ts:47

Aliases for the flag.


default?

ts
optional default: unknown;

Defined in: packages/parser/src/types.ts:49

The default value of the flag.


required?

ts
optional required: boolean;

Defined in: packages/parser/src/types.ts:51

Whether the flag is required.


type

ts
type: T;

Defined in: packages/parser/src/types.ts:45

The type constructor or a function to convert the string value. To support multiple occurrences of a flag (e.g., --file a --file b), wrap the type in an array: [String], [Number]. e.g., String, Number, [String], (val) => val.split(',')

Released under the MIT license