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

x/args/index.ts>valueErrors.InvalidChoice

Extensible CLI arguments parser for Deno with intelligent TypeScript inference
Go to Latest
class valueErrors.InvalidChoice
extends ValueError
import { valueErrors } from "https://deno.land/x/args@2.1.0/index.ts";
const { InvalidChoice } = valueErrors;

ValueError class for when raw input not matching any expected choice

Constructors

new
InvalidChoice(raw: string, choices: readonly ValidChoice[])

Type Parameters

ValidChoice extends string | number

Union type of valid choices