@storm-stack/types
Version:
⚡ The storm-stack monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.
18 lines (17 loc) • 420 B
TypeScript
/**
* Checks if `obj` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
* `SyntaxError`, `TypeError`, or `URIError` object.
*
* @example
* ```typescript
* isError(new Error)
* // => true
*
* isError(Error)
* // => false
* ```
*
* @param obj - The obj to check.
* @returns Returns `true` if `obj` is an error object, else `false`.
*/
export declare const isError: (obj: unknown) => obj is Error;