type A = {
a:string;
}
type C = A[];
const aa:C = Array.from( // Why I don't see any error as `d` shouldn't be accepted?
new Map(
[{a: 'a', d: 1}].map(item=> [item.a, item])
).values()
)
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.