(e: unknown)
| 109 | * Use at catch-site boundaries when you need an Error instance. |
| 110 | */ |
| 111 | export function toError(e: unknown): Error { |
| 112 | return e instanceof Error ? e : new Error(String(e)) |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * Extract a string message from an unknown error-like value. |
no outgoing calls
no test coverage detected