DEV Community


Discussion on: Advanced TypeScript Exercises - Answer 2

macsikora profile image
Maciej Sikora Author

Type is Admin but the structure which is returned has kind property with value customer, so its not valid member of the type Admin.

lukaszahradnik profile image
Lukáš Zahradník

Yes, it's not valid. But admin should always be type of Admin, or an error should occur (like in this case).

Forem Open with the Forem app