Skip to main content
Module

x/sane_fmt/x/args.ts>values.Choice

Opinionated code formatter for TypeScript and JavaScript
Go to Latest
function values.Choice
import { values } from "https://deno.land/x/sane_fmt@0.15.1/x/args.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