1 | import { PrettyPrintableError } from './pretty-print';
|
2 |
|
3 |
|
4 |
|
5 | export interface OclifError {
|
6 | oclif: {
|
7 | exit?: number | false;
|
8 | };
|
9 | }
|
10 | export declare function addOclifExitCode(error: Record<string, any>, options?: {
|
11 | exit?: number | false;
|
12 | }): OclifError;
|
13 | export declare class CLIError extends Error implements OclifError {
|
14 | oclif: OclifError['oclif'];
|
15 | code?: string;
|
16 | constructor(error: string | Error, options?: {
|
17 | exit?: number | false;
|
18 | } & PrettyPrintableError);
|
19 | get stack(): string;
|
20 | /**
|
21 | * @deprecated `render` Errors display should be handled by display function, like pretty-print
|
22 | * @return {string} returns a string representing the dispay of the error
|
23 | */
|
24 | render(): string;
|
25 | get bang(): string;
|
26 | }
|
27 | export declare namespace CLIError {
|
28 | class Warn extends CLIError {
|
29 | constructor(err: string | Error);
|
30 | get bang(): string;
|
31 | }
|
32 | }
|