type Words = { [key: string]: string; }; class Word { constructor(public term: string, public def: string) {} } class Dict { private words: Words constructor() { this.words = {} } add(term: string) { if (this.words[term] === undefined) { this.words[term] = '' } } get(term: string) { if (this.words[term] !== undefined) { return console.log(this.words[term]) } } delete(term: string) { if (this.wor..