TypeScript type alias to pick values of an object matching a set of arbitratry keys that may or may not exist in the object

前端 未结 0 1701
清歌不尽
清歌不尽 2021-02-15 17:42

Consider the following:

type X = {foo: string};
type Y = {foo: number};
type Z = {foo: string, bar: number};
type W = {bar: string};
type Q = {baz: string};

type         


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