Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alloy_folk/deps.ts>cliffy.Command#command

An application installer for restriced macOS
Go to Latest
method cliffy.Command.prototype.command
Re-export
import { cliffy } from "https://deno.land/x/alloy_folk@v1.1.1/deps.ts";
const { Command } = cliffy;

Add new sub-command.

Type Parameters

C extends Command<G | void | undefined, T | void | undefined, Record<string, any> | void, Array<unknown>, Record<string, any> | void, Record<string, any> | void, Record<string, any> | void, OneOf<CP, this> | undefined>
G extends (CP extends Command<any> ? CPG : Merge<CPG, CG>)
T extends (CP extends Command<any> ? CPT : Merge<CPT, CT>)

Parameters

name: string

Command definition. E.g: my-command <input-file:string> <output-file:string>

cmd: C

The new child command to register.

optional
override: boolean

Override existing child command.

Returns

C extends Command<any, any, infer Options, infer Arguments, infer GlobalOptions, infer Types, infer GlobalTypes, any> ? Command<G, T, Options, Arguments, GlobalOptions, Types, GlobalTypes, OneOf<CP, this>> : never

Add new sub-command.

Type Parameters

N extends string
A extends TypedCommandArguments<N, CP extends Command<any> ? CPT : Merge<CPT, CGT>>

Parameters

name: N

Command definition. E.g: my-command <input-file:string> <output-file:string>

optional
desc: string

The description of the new child command.

optional
override: boolean

Override existing child command.

Returns

CPG extends number ? Command<any> : Command<CP extends Command<any> ? CPG : Merge<CPG, CG>, CP extends Command<any> ? CPT : Merge<CPT, CGT>, void, A, void, void, void, OneOf<CP, this>>