123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- declare namespace PluginError {
- interface Constructor {
-
- new <E extends Error>(plugin: string, error: E, options?: Options): PluginError<E>;
-
- new <E extends Error = Error>(plugin: string, error: E | string, options: Options): PluginError<E | {[K in keyof E]: undefined}>;
-
- new <E extends Error = Error>(plugin: string, error: E | string | (Options & {message: string})): PluginError<E | {[K in keyof E]: undefined}>;
-
- new(options: Options & {plugin: string, message: string}): PluginError;
- }
- interface Options {
-
- name?: string;
-
- message?: any;
-
- fileName?: string;
-
- lineNumber?: number;
-
- showProperties?: boolean;
-
- showStack?: boolean;
-
- stack?: string;
- }
-
- interface SimplePluginError extends Error {
-
- plugin: string;
-
- showStack: boolean;
-
- showProperties: boolean;
-
- fileName?: string;
-
- lineNumber?: number;
- }
- }
- type PluginError<T = {}> = PluginError.SimplePluginError & T;
- declare const PluginError: PluginError.Constructor;
- export = PluginError;
|