/// type StackTraceRecord = { [key: string]: string; } declare class Exception extends Error { name: string; previous?: Exception | Error; code: number; /** * The parsed stack trace for this exception. */ readonly stackTrace: StackTraceRecord[]; /** * The exception message. */ message: string; /** * Constructor. */ __construct(message?: string, code?: number, previous?: Error): void; constructor(message?: string, code?: number, previous?: Error); /** * Parses the stack trace of the given error and * returns it as an key-value object. */ static parseStackTrace(error: Error): StackTraceRecord[]; private _message: string; private _stackTrace: Record[]; private _originalStack: string; } declare class BadMethodCallException extends Exception {} declare class DomainException extends Exception {} declare class InvalidArgumentException extends Exception {} declare class LogicException extends Exception {} declare class OutOfBoundsException extends Exception {} declare class RuntimeException extends Exception {} declare class UnderflowException extends Exception {} declare class UnexpectedValueException extends Exception {} declare global { var Exception: Newable; var BadMethodCallException: Newable; var DomainException: Newable; var InvalidArgumentException: Newable; var LogicException: Newable; var OutOfBoundsException: Newable; var RuntimeException: Newable; var UnderflowException: Newable; var UnexpectedValueException: Newable; namespace NodeJS { interface Global { Exception: Newable; BadMethodCallException: Newable; DomainException: Newable; InvalidArgumentException: Newable; LogicException: Newable; OutOfBoundsException: Newable; RuntimeException: Newable; UnderflowException: Newable; UnexpectedValueException: Newable; } } } export {};