TypeScript homework