re: What is the most challenging thing in Typescript? VIEW POST


I personally find it very challenging to manage similar interfaces, while using proper naming and accounting for type safety. A good example can be having a GetDto which contains id (and some other fields) vs PostDto which has less field, but in the end describes the same object. What’s your take on that? Any suggestions? Would you use omit with only one interface, optional fields or maintain two separate interfaces ?

code of conduct - report abuse