(
input: string,
commandOptions: CommandOptions<A, O, C>,
)
| 2448 | }; |
| 2449 | |
| 2450 | #isCommand<A = void, O extends CommanderArgs = CommanderArgs, C extends Context = Context>( |
| 2451 | input: string, |
| 2452 | commandOptions: CommandOptions<A, O, C>, |
| 2453 | ) { |
| 2454 | const longName = commandOptions.rawName; |
| 2455 | |
| 2456 | if (input === longName) { |
| 2457 | return true; |
| 2458 | } |
| 2459 | |
| 2460 | if (commandOptions.alias) { |
| 2461 | if (Array.isArray(commandOptions.alias)) { |
| 2462 | return commandOptions.alias.includes(input); |
| 2463 | } |
| 2464 | return commandOptions.alias === input; |
| 2465 | } |
| 2466 | |
| 2467 | return false; |
| 2468 | } |
| 2469 | |
| 2470 | #findCommandByName(name: string) { |
| 2471 | return this.program.commands.find( |
no outgoing calls
no test coverage detected