Function: isCommandError()
Check whether an error is a CommandError.
An error from another copy of gunshi is recognized through the Symbol.for('gunshi.CommandError') brand. It is not recognized by error.name, so an error of the app that is also named CommandError is not taken for one.
Signature
ts
export function isCommandError(error: unknown): error is CommandErrorParameters
| Name | Type | Description |
|---|---|---|
error | unknown | An unknown error |
Returns
error is CommandError — true if the error is a CommandError
