swc/bundler/tests/.cache/deno/c8b799aae9ee9bc41146ecd14ace7a0aee25aeaf.ts
강동윤 1178686a4c
fix(bundler): Fix bundler (#1576)
swc_bundler:
 - Fix remapping of exports. (denoland/deno#9350)
2021-04-16 18:09:38 +00:00

20 lines
535 B
TypeScript

// Loaded from https://deno.land/x/cliffy@v0.12.1/packages/command/types/action-list.ts
import { Command } from '../lib/command.ts';
import { StringType } from './string.ts';
export class ActionListType extends StringType {
constructor( protected cmd: Command ) {
super();
}
public complete(): string[] {
return this.cmd.getCompletions()
.map( type => type.name )
// filter unique values
.filter( ( value, index, self ) => self.indexOf( value ) === index );
}
}