Skip to content

Type Alias: IgnoreFunction()

ts
type 
IgnoreFunction
= (
type
,
arg
) => boolean;

Defined in: packages/parser/src/types.ts:30

A callback function to conditionally stop parsing. When it returns true, parsing stops and remaining arguments are preserved in ignored.

Parameters

type

The type of the current argument: 'known-flag' or 'unknown-flag' for flags, 'parameter' for positional arguments

typeof KNOWN_FLAG | typeof UNKNOWN_FLAG | typeof PARAMETER

arg

string

The current argument being processed

Returns

boolean

true to stop parsing, false to continue

Released under the MIT license