Skip to content

Type Alias: CommandNotFoundErrorOptions ​

Options for CommandNotFoundError.

Signature ​

ts
export type CommandNotFoundErrorOptions = { code?: CommandNotFoundErrorCode; values?: Record<string, unknown>; commandName: string; candidates?: readonly string[]; commandPath?: readonly string[]; cause?: unknown }

Properties ​

NameTypeDescription
candidates (optional)readonly string[]The names of the commands at the same level, which @gunshi/plugin-suggestion offers as "Did you mean". An internal command is left out, as the help leaves it out.
cause (optional)unknownUnderlying cause.
code (optional)CommandNotFoundErrorCodeLocalization resource key for command-not-found rendering.
commandNamestringThe command name that could not be resolved.
commandPath (optional)readonly string[]Parent command path where resolution failed.
values (optional)Record<string, unknown>Values used when localizing the message.

Released under the MIT License.