Created
September 10, 2025 16:50
-
-
Save FlorianWendelborn/b557f483bb6b46a4b1bf307fb8948e9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const isError = (error: unknown): error is Error => | |
| typeof error === "object" && | |
| error !== null && | |
| "name" in error && | |
| typeof error.name === "string" && | |
| (("stack" in error && typeof error.stack === "string") || | |
| error instanceof Error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment