Class: CommandNotFoundError
Error raised when a command cannot be resolved.
Each instance carries a non-enumerable brand keyed by Symbol.for('gunshi.CommandNotFoundError'), so that isCommandNotFoundError recognizes it even when it was created by another bundled copy of gunshi.
Extends
Error
Signature
ts
export class CommandNotFoundError extends ErrorConstructors
Constructor
ts
new CommandNotFoundError(message: string, options: CommandNotFoundErrorOptions): CommandNotFoundError;Create a command-not-found error.
Parameters
| Name | Type | Description |
|---|---|---|
message | string | Fallback error message |
options | CommandNotFoundErrorOptions | Command-not-found metadata |
Returns
Properties
| Name | Type | Description |
|---|---|---|
candidates (readonly) | readonly string[] | |
code (optional, readonly) | CommandNotFoundErrorCode | |
commandName (readonly) | string | |
commandPath (readonly) | readonly string[] | |
values (readonly) | Record<string, unknown> |
