Skip to main content
Module

x/args/index.ts>Choice

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

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