(error: unknown)
| 114 | } |
| 115 | |
| 116 | export function isErrorLike(error: unknown): error is Error { |
| 117 | return ( |
| 118 | error instanceof Error || |
| 119 | (typeof error === 'object' && |
| 120 | error !== null && |
| 121 | typeof (error as Error).name === 'string' && |
| 122 | typeof (error as Error).message === 'string') |
| 123 | ); |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Error thrown when an error boundary catches an error that is not an `Error` instance. |
no outgoing calls
no test coverage detected