Module

x/lume/deps/cliffy.ts>Command#globalOption

🔥 Static site generator for Deno 🦕
Very Popular
Latest
method Command.prototype.globalOption
import { Command } from "https://dotland.deno.dev/x/lume@v2.4.2/deps/cliffy.ts";

Type Parameters

TFlags extends string
TGlobalOptions extends TypedOption<TFlags, TCommandOptions, Merge<TParentCommandTypes, Merge<TCommandGlobalTypes, TCommandTypes>>, undefined extends TConflicts ? TRequired : false, TDefaultValue>
TMappedGlobalOptions extends MapValue<TGlobalOptions, TMappedValue, TCollect>
optional
TRequired extends OptionOptions["required"] = undefined
optional
TCollect extends OptionOptions["collect"] = undefined
optional
TConflicts extends OptionOptions["conflicts"] = undefined
optional
TDefaultValue = undefined
optional
TMappedValue = undefined

Parameters

flags: TFlags
desc: string
optional
opts: Omit<GlobalOptionOptions<Partial<TCommandOptions>, TCommandArguments, MergeOptions<TFlags, TCommandGlobals, TGlobalOptions>, TParentCommandGlobals, TCommandTypes, TCommandGlobalTypes, TParentCommandTypes, TParentCommand>, "value"> & { default?: DefaultValue<TDefaultValue>; required?: TRequired; collect?: TCollect; value?: OptionValueHandler<MapTypes<ValueOf<TGlobalOptions>>, TMappedValue>; } | OptionValueHandler<MapTypes<ValueOf<TGlobalOptions>>, TMappedValue>

Returns

Command<TParentCommandGlobals, TParentCommandTypes, TCommandOptions, TCommandArguments, MergeOptions<TFlags, TCommandGlobals, TMappedGlobalOptions>, TCommandTypes, TCommandGlobalTypes, TParentCommand>