Skip to main content
Module

x/sane_fmt/x/args.ts>Choice

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