Skip to content

isError

isError(o): o is Error

Checks whether a value is an instance of the built-in Error class.

unknown

The value to test.

o is Error

true if o is an Error, otherwise false.