Design pattern implementations in TypeScript