Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alloy_folk/deps.ts>cliffy.Command#env

An application installer for restriced macOS
Go to Latest
method cliffy.Command.prototype.env
Re-export
import { cliffy } from "https://deno.land/x/alloy_folk@v1.1.1/deps.ts";
const { Command } = cliffy;

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>