Typescript: function that returns a predefined union type

前端 未结 0 402
无人及你
无人及你 2021-01-23 06:48

Is there a way in TypeScript to model a function that can return an already specified union type, like myFunc in the example below?

type UnionType =          


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