import { Command } from "https://deno.land/x/lume@v2.4.1/deps/cliffy.ts";
Add new environment variable.
Type Parameters
optional
R extends EnvVarOptions["required"] = undefinedoptional
P extends EnvVarOptions["prefix"] = undefinedParameters
name: N
Name of the environment variable.
options: Omit<EnvVarOptions, "value"> & { global: true; required?: R; prefix?: P; value?: EnvVarValueHandler<MapTypes<ValueOf<G>>, V>; }
Environment variable options.
Type Parameters
TEnvVar extends TypedEnv<TNameAndValue, TPrefix, TCommandOptions, Merge<TParentCommandTypes, Merge<TCommandGlobalTypes, TCommandTypes>>, TRequired>
TMappedEnvVar extends MapValue<TEnvVar, TMappedValue>
optional
TRequired extends EnvVarOptions["required"] = undefinedoptional
TPrefix extends EnvVarOptions["prefix"] = undefinedParameters
name: TNameAndValue
optional
options: Omit<EnvVarOptions, "value"> & { required?: TRequired; prefix?: TPrefix; value?: EnvVarValueHandler<MapTypes<ValueOf<TEnvVar>>, TMappedValue>; }Returns
Command<TParentCommandGlobals, TParentCommandTypes, Merge<TCommandOptions, TMappedEnvVar>, TCommandArguments, TCommandGlobals, TCommandTypes, TCommandGlobalTypes, TParentCommand>