Closed
Description
⚙ Compilation target
ESNext
⚙ Library
ESNext
Missing / Incorrect Definition
interface ErrorConstructor {
/**
* Indicates whether the argument provided is a built-in Error instance or not.
*/
isError(error: unknown): error is Error;
}
Sample Code
try {
// ...
} catch (e) {
if (Error.isError(e)) {
// ...
}
}