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

x/args/index.ts>commands.FlaggedCommand

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

Add a flag parser on top of existing command parser

type

<MainVal, NextKey extends string, NextVal, ErrList extends readonly ParseError[]>(main: Command<CommandReturn.Main<MainVal>, ErrList>, flag: FlagType<NextKey, NextVal>) => Command<FlaggedCommandReturn<MainVal, NextKey, NextVal>, ErrList | readonly [ParseError]>