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

x/ayonli_jsext/cli/common.ts>ParseOptions

A JavaScript extension package for building strong and modern applications.
Latest
interface ParseOptions
import { type ParseOptions } from "https://deno.land/x/ayonli_jsext@v0.9.72/cli/common.ts";

Options for parsing CLI arguments, used by the parseArgs function.

Properties

optional
alias: { [char: string]: string; }

A map of alias characters to their full names. Once set, we can use the alias characters in the arguments, and they will be converted to their full names in the result object after parsing.

optional
lists: string[]

Argument names that should be treated as lists. When an argument is in this list, the result object will store its values in an array.

optional
noCoercion: boolean | string[]

By default, the parseArgs function will automatically convert the argument value to a number or boolean if it looks like one. If we don't want this behavior for some arguments, we can set this option to true, or an array of argument names that should not be coerced.