Skip to main content
Module

x/args/index.ts>values.Choice

Extensible CLI arguments parser for Deno with intelligent TypeScript inference
Latest
function values.Choice
import { values } from "https://deno.land/x/args@2.1.1/index.ts";
const { Choice } = values;

Create type and parser of choice (union)

Type Parameters

Value extends number | string

Union type of choices to make

Parameters

...choices: { readonly value: Value; readonly describe?: string; }[]

Choices to make

Returns

ValueType<Value, readonly [string]>

Type and parser of choices