Skip to main content
Module

x/args/types.ts>FlagType

Extensible CLI arguments parser for Deno with intelligent TypeScript inference
Latest
interface FlagType
import { type FlagType } from "https://deno.land/x/args@2.1.1/types.ts";

Interface of a flag type

Type Parameters

Name extends string

Type of flag's name, preferably literal

Value

Type of flag's value

Properties

readonly
name: Name

Flag name

readonly
[[Symbol.toStringTag]]: string

Class name

Methods

extract(args: readonly ArgvItem[]): Result<{ value: Value; consumedFlags: ReadonlySet<ArgvItem>; }, FlagError>

Extract value from a list of arguments

help(): FlagHelp

Create a FlagHelp to display in help::help() or wrapper::help()