Update CommandInterface for dynamic project lists

This commit is contained in:
2022-01-16 15:15:48 +01:00
parent 0539bceeaa
commit 3efbcae886
5 changed files with 39 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
import { Project } from "../projects/types";
import { printSyntax, commandList } from "./definitions";
interface CommandInterfaceCallbacks {
@@ -7,9 +8,11 @@ interface CommandInterfaceCallbacks {
export class CommandInterface {
callbacks: CommandInterfaceCallbacks;
projects: Project[];
constructor(callbacks: CommandInterfaceCallbacks) {
constructor(callbacks: CommandInterfaceCallbacks, projects: Project[]) {
this.callbacks = callbacks;
this.projects = projects;
}
static commandCompletion(input: string): string[] {