Reputation: 1759
given the following type:
type Foo = {
a: {
b: number
c: string
}
d: number
}
is there a way to retrieve the anonymous nested types? I was thinking something like TypeOf<Foo, 'a'>
should return the type made of b and c and TypeOf<Foo, 'd'>
should be an alias to number. I made up the syntax, but I wanted to know if a similar concept exists
Upvotes: 0
Views: 109