Skip to content

Function: isLazyCommand() ​

Check if the given command is a LazyCommand.

Signature ​

ts
export function isLazyCommand<G extends GunshiParamsConstraint = DefaultGunshiParams>(cmd: unknown): cmd is LazyCommand<G>

Type Parameters ​

Name
G extends GunshiParamsConstraint = DefaultGunshiParams

Parameters ​

NameTypeDescription
cmdunknownA command to check

Returns ​

cmd is LazyCommand<G> — true if the command is a LazyCommand, otherwise false A lazy command is identified by its commandName property. The property may be undefined when the lazy command has no definition name.

Released under the MIT License.