1 | import Command from "./command";
|
2 | import Argument from "./argument";
|
3 | import Option from "./option";
|
4 | export interface ErrorParameters {
|
5 | message?: string;
|
6 | reason: ErrorReason;
|
7 | parts: string[];
|
8 | params?: {
|
9 | origin: Argument;
|
10 | arg: string;
|
11 | } | {
|
12 | origin: Argument;
|
13 | opts: any;
|
14 | args: string[];
|
15 | } | {
|
16 | origin: Command<any, any>;
|
17 | args: string[];
|
18 | } | {
|
19 | option: Option;
|
20 | opts: any;
|
21 | args: string[];
|
22 | };
|
23 | }
|
24 | export declare enum ErrorReason {
|
25 | UnsupportedFormatArgument = "unsupported format",
|
26 | ArgumentsRequired = "1 or more arguments required",
|
27 | ArgumentRequired = "argument required",
|
28 | ParameterCantPlacedAfterVariadic = "parameter can not placed after variadic parameter",
|
29 | ParameterCannPlacedAfterOptional = "required parameter is not placed after optional parameter",
|
30 | UnknownOption = "unknown option",
|
31 | OptionNameMismatch = "short or long option name mismatch",
|
32 | OptionValueRequired = "option value required"
|
33 | }
|
34 | export declare class CommandpostError {
|
35 | params: ErrorParameters;
|
36 | stack?: string;
|
37 | constructor(params: ErrorParameters);
|
38 | readonly name: string;
|
39 | readonly message: string | undefined;
|
40 | }
|