TypeScript: inheritance