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

x/args/index.ts>values.Choice

Extensible CLI arguments parser for Deno with intelligent TypeScript inference
Go to Latest
function values.Choice
import { values } from "https://deno.land/x/args@2.1.0/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