Skip to content

Function: hasPriorityValidationError() ​

Check whether validation errors must stop the command before it runs: an unknown command, a command line that cannot be resolved, an unknown option (unless strict is false), or a positional argument that the command does not take, of strictPositionals. The global options plugin reports them before --help and --version, except an unknown option and a positional argument that the command does not take: --help and --version are answered before them, as they are before the other validation errors.

Signature ​

ts
export function hasPriorityValidationError(error: AggregateError | undefined): boolean

Parameters ​

NameTypeDescription
errorAggregateError | undefinedAn aggregate validation error

Returns ​

boolean — true if the validation error must be handled with priority

Released under the MIT License.