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[]Command names available at the same level.
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.