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

x/args/index.ts>types.FlagType

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

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()