I am attempting to create a map in TypeScript that uses two-part keys. The key format I am working with looks like this:
type Key = {
section: number,
index: number
}
In my attempts to implement this, I have created a map using the following syntax:
let map = new Map<Key,Record>()
However, when I try to retrieve a value from the map using:
cont val = map.get(myKey)
The result is always undefined
.
Is there a way to successfully store and access complex types in TypeScript maps?