Module

x/cliffy/command/command.ts>Command#env

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
method Command.prototype.env
import { Command } from "https://dotland.deno.dev/x/cliffy@v0.23.2/command/command.ts";

Add new environment variable.

Type Parameters

N extends string
G extends TypedEnv<N, P, CO, Merge<CPT, Merge<CGT, CT>>, R>
MG extends MapValue<G, V>
optional
R extends IEnvVarOptions["required"] = undefined
optional
P extends IEnvVarOptions["prefix"] = undefined
optional
V = undefined

Parameters

name: N

Name of the environment variable.

description: string

The description of the environment variable.

options: Omit<IEnvVarOptions, "value"> & { global: true; required?: R; prefix?: P; value?: IEnvVarValueHandler<MapTypes<ValueOf<G>>, V>; }

Environment variable options.

Returns

Command<CPG, CPT, CO, CA, Merge<CG, MG>, CT, CGT, CP>

Type Parameters

N extends string
O extends TypedEnv<N, P, CO, Merge<CPT, Merge<CGT, CT>>, R>
MO extends MapValue<O, V>
optional
R extends IEnvVarOptions["required"] = undefined
optional
P extends IEnvVarOptions["prefix"] = undefined
optional
V = undefined

Parameters

name: N
description: string
optional
options: Omit<IEnvVarOptions, "value"> & { required?: R; prefix?: P; value?: IEnvVarValueHandler<MapTypes<ValueOf<O>>, V>; }

Returns

Command<CPG, CPT, Merge<CO, MO>, CA, CG, CT, CGT, CP>