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

x/args/index.ts>flags.CollectOption

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

Declare an option that collects value after flags

CLI example: --opt foo --opt bar --opt baz["foo", "bar", "baz"]

type

<Name extends string, Value>(name: Name, descriptor: CollectOptionDescriptor<Value>) => FlagType<Name, Value[]>