isError

Bun

Symbol

ErrorConstructor.isError

isError(value: unknown): value is Error

Check if a value is an instance of Error

@param value

The value to check

@returns

True if the value is an instance of Error, false otherwise