Paste this snippet in the playground:
const result = [{ foo: 'hello' }]
.map(({ foo }) => foo)
.map(foo => foo);
If you hover over foo in the first map() call, you'll notice that its type is any (should be string).
The type of result is correctly inferred to be string[], though. It just seems that there is no type information for destructured function parameters.
Paste this snippet in the playground:
If you hover over
fooin the firstmap()call, you'll notice that its type isany(should bestring).The type of
resultis correctly inferred to bestring[], though. It just seems that there is no type information for destructured function parameters.