import { type ParseFlagsOptions } from "https://deno.land/x/cliffy@v1.0.0-rc.2/flags/mod.ts";
Parser options.
Type Parameters
optional
TFlagOptions extends FlagOptions = FlagOptionsProperties
optional
flags: Array<TFlagOptions>An array of flag options.
optional
parse: TypeHandler<unknown>Parser callback function for custom types.
optional
option: (option: TFlagOptions, value?: unknown) => voidOption callback function. Will be called for all parsed options.
Enable stop early. If enabled, all arguments starting from the first non option argument will be added to the unknown array.
For example:
command --debug-level warning server --port 80
Will result in:
- flags: { debugLevel: 'warning' }
- unknown: ['server', '--port', '80']
Works similar to stopEarly
, bit stops on first unknown option or argument.
Don't throw an error when no arguments are passed to the parseFlags
function.