This commit is contained in:
Tutur33
2023-11-24 22:35:41 +01:00
parent 3c0b507a93
commit 7644b2a0f7
45165 changed files with 4803356 additions and 3 deletions
+28
View File
@@ -0,0 +1,28 @@
import { ErrorLike } from "./types";
/**
* The Property Descriptor of a lazily-computed `stack` property.
*/
interface LazyStack {
configurable: true;
/**
* Lazily computes the error's stack trace.
*/
get(): string | undefined;
}
/**
* Is the property lazily computed?
*/
export declare function isLazyStack(stackProp: PropertyDescriptor | undefined): stackProp is LazyStack;
/**
* Is the stack property writable?
*/
export declare function isWritableStack(stackProp: PropertyDescriptor | undefined): boolean;
/**
* Appends the original `Error.stack` property to the new Error's stack.
*/
export declare function joinStacks(newError: ErrorLike, originalError?: ErrorLike): string | undefined;
/**
* Calls `joinStacks` lazily, when the `Error.stack` property is accessed.
*/
export declare function lazyJoinStacks(lazyStack: LazyStack, newError: ErrorLike, originalError?: ErrorLike): void;
export {};