Creating Object-oriented TypeScript Code