import type { Predicate } from "@rickosborne/typical"; /** * Specifier for which lines of a stack trace should be removed. */ export type StackRemoveIf = Predicate | RegExp | string; /** * Wrap an Error in a proxy which cleans up the stack trace to be * more human-readable. It filters out lines from third-party code, * so you can quickly see your own code in the call stack. * May optionally include some way of indicating additional lines * which should be removed, so a guard function could make itself * transparent, making it seem like the caller threw the error. * @param err - Some kind of Error. * @param removeIf - A matcher to indicate whether a line should be removed (not kept!). * Generally, you'll pass in the name of the calling function, calling file, or similar. */ export declare function scrubStackTrace(err: E, removeIf?: StackRemoveIf | undefined): E; export declare function scrubStackTrace(stack: string | undefined, removeIf?: StackRemoveIf | undefined): string | undefined; //# sourceMappingURL=scrub-stack-trace.d.ts.map