Is it possible to restrict Generic to certain types?

前端 未结 0 1170
甜味超标
甜味超标 2020-12-04 01:07

Is it possible to restrict Generic type to string | number only?

Here is the example of the function I\'m trying to type (each element of the array needs

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