Extend either type1 or type2 with generics in TypeScript

后端 未结 0 1712
余生分开走
余生分开走 2021-01-12 05:30

Is there a way to make a generic T extend either type1 or type2 in TypeScript?

For example, I have the following:



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题