UNPKG

@biskyjs/framework

Version:
38 lines 1.13 kB
import type { IArgument } from "../lib/structures/argument"; import { UserError } from "./user"; /** * Errors thrown by the argument parser * @since 1.0.0 * @property name This will be `'ArgumentError'` and can be used to distinguish the type of error when any error gets thrown */ export declare class ArgumentError<T = unknown> extends UserError { readonly argument: IArgument<T>; readonly parameter: string; constructor(options: ArgumentError.Options<T>); get name(): string; } export declare namespace ArgumentError { /** * The options for {@link ArgumentError}. * @since 1.0.0 */ interface Options<T> extends Omit<UserError.Options, "identifier"> { /** * The argument that caused the error. * @since 1.0.0 */ argument: IArgument<T>; /** * The parameter that failed to be parsed. * @since 1.0.0 */ parameter: string; /** * The identifier. * @since 1.0.0 * @default argument.name */ identifier?: string; } } //# sourceMappingURL=argument.d.ts.map