Typescript used type union for generic

前端 未结 0 773
甜味超标
甜味超标 2021-01-02 16:01

I have a tagged union class like this

type TaggedUnion = { type: "type1", prop1: string, prop2: string,.. } | { type: "type2", prop1: stri         


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