Skip to content

Instantly share code, notes, and snippets.

@jasonbyrne
Created April 14, 2022 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonbyrne/ff0f82ae1869d897c5c7c85cfda10027 to your computer and use it in GitHub Desktop.
Save jasonbyrne/ff0f82ae1869d897c5c7c85cfda10027 to your computer and use it in GitHub Desktop.
Menu with Basic Generic
class Menu<T> {
private items: T[] = [];
public addItem(item: T) {
this.items.push(item);
}
public getItems(): T[] {
return this.items;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment