/** * A readable reason out of anything that can be thrown, without ever throwing. * * Two mistakes live here, both made in this codebase before this was shared: * * An `as Error` cast is a guess. Anything at all can be thrown: a string * prints "undefined", and a null throws a TypeError from inside the very * handler that exists to keep the program alive. * * Reading the reason can ITSELF throw. A thrown object can carry a `toString` * or `Symbol.toPrimitive` that throws, and the exception then travels straight * back out through the recovery path. A formatter that can kill the program it * exists to keep alive is the same bug in miniature. */ export declare function thrownReason(err: unknown): string;