Breaking/collapsing a discriminated union - derive an umbrella type with all possible key-value combinations from the union

后端 未结 0 1033
-上瘾入骨i
-上瘾入骨i 2021-01-16 21:33

I have a discriminated union:

type Union = { a: "foo", b: string, c: number } | {a: "bar", b: boolean }

I need to derive

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