What's the Difference Between Map and Record [Duplicate]
I Don't Quite Get What the Difference Between Map and Record in Typescript Is. the Only Comparison I Found Was a Very Useful Built-in Type Introduced by...
I don't quite get what the difference between Map and Record in Typescript is.
The only comparison I found was
A very useful built-in type introduced by Typescript 2.1 is Record: it allows you to create a typed map and is great for creating composite interfaces.
,
but typing Maps like this:
const testMap = new Map<number, string>();
also works, so I don't really understand the difference.