mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 05:01:42 +03:00
14 lines
400 B
TypeScript
14 lines
400 B
TypeScript
// Loaded from https://deno.land/x/cliffy@v0.12.1/packages/command/types/command.ts
|
|
|
|
|
|
import { Command } from '../lib/command.ts';
|
|
import { StringType } from './string.ts';
|
|
|
|
export class CommandType extends StringType {
|
|
|
|
public complete( cmd: Command, parent?: Command ): string[] {
|
|
return parent?.getCommands( false )
|
|
.map( ( cmd: Command ) => cmd.getName() ) || [];
|
|
}
|
|
}
|