import { Command } from "./command";

export class CommandTable {
  private name: string;
  private inherit: CommandTable[] = [];
  private commands: Map<string, Command> = new Map();

  constructor (name: string, inherit: CommandTable[]) {
    this.name = name;
    this.inherit = inherit;
  }
}

import { Command } from "./command";

export class CommandTableEntry {
  name: string;
  command: Command;
}

export class CommandTable {
  private name: string;
  private inherit: CommandTable[] = [];
  private commands: CommandTableEntry[] = [];

  constructor (name: string, inherit: CommandTable[]) {
    this.name = name;
    this.inherit = inherit;
  }
}

Store an array of entries rather than a map.
CommandTable: Store an array of entries rather than a map.
