TypeScript: inheritence