- durationFlag(options): OptionFlag<Duration, CustomOptions>
Returns OptionFlag<Duration, CustomOptions>
- durationFlag(options): OptionFlag<undefined | Duration[], CustomOptions>
Returns OptionFlag<undefined | Duration[], CustomOptions>
- durationFlag(options): OptionFlag<undefined | Duration, CustomOptions>
Returns OptionFlag<undefined | Duration, CustomOptions>
- durationFlag(options): OptionFlag<Duration, CustomOptions>
Parameters
- options: DurationFlagConfig & {} & (({ required: true; } | { default: FlagDefault<Duration | undefined, DurationFlagConfig>; }) & Partial<OptionFlag<Duration, DurationFlagConfig>>)
Returns OptionFlag<Duration, CustomOptions>
- durationFlag(options): OptionFlag<Duration[], CustomOptions>
Parameters
- options: DurationFlagConfig & {} & (({ required: true; } | { default: FlagDefault<Duration[] | undefined, DurationFlagConfig>; }) & Partial<OptionFlag<Duration[], DurationFlagConfig>>)
Returns OptionFlag<Duration[], CustomOptions>
- durationFlag(options): OptionFlag<Duration, CustomOptions>
Parameters
- options: DurationFlagConfig & {} & (({ required: true; } | { default: FlagDefault<Duration | undefined, DurationFlagConfig>; }) & Partial<OptionFlag<Duration, DurationFlagConfig>>)
Returns OptionFlag<Duration, CustomOptions>
- durationFlag(options): OptionFlag<undefined | Duration, CustomOptions>
Returns OptionFlag<undefined | Duration, CustomOptions>
- durationFlag(options): OptionFlag<Duration, CustomOptions>
Returns OptionFlag<Duration, CustomOptions>
- durationFlag(options?): OptionFlag<Duration, CustomOptions>
Returns OptionFlag<Duration, CustomOptions>
- durationFlag(options): OptionFlag<Duration[], CustomOptions>
Returns OptionFlag<Duration[], CustomOptions>
Duration flag with built-in default and min/max validation You must specify a unit Defaults to undefined if you don't specify a default
Example