Why duck typing is allowed for classes in TypeScript Why duck typing is allowed for classes in TypeScript javascript javascript