Skip to main content
Module

x/args/index.ts>flags.Flag

Extensible CLI arguments parser for Deno with intelligent TypeScript inference
Latest
variable flags.Flag
import { flags } from "https://deno.land/x/args@2.1.1/index.ts";
const { Flag } = flags;

Declare a binary flag:

  • value is true if the flag is found in argument list once or multiple times
  • value is false if the flag isn't found in argument list

type

<Name extends string>(name: Name, descriptor?: FlagDescriptor) => FlagType<Name, boolean>