Skip to content

Function: isJsonOutputError() ​

Check whether an error is a JsonOutputError.

An error from another copy of gunshi is recognized through the Symbol.for('gunshi.JsonOutputError') brand, not by error.name.

Signature ​

ts
export function isJsonOutputError(error: unknown): error is JsonOutputError

Parameters ​

NameTypeDescription
errorunknownAn unknown error

Returns ​

error is JsonOutputError — true if the error is a JsonOutputError

Released under the MIT License.