I need to operate on a coordinate object like this:
type Pos = [number, number];
I want to make a Map from coordinates to string:
type Board = Map<Pos, string>
let a1 = [1,1]
let board = new Map([a1, 'a1']);
Now I can access a1
like board.get(a1)
.
But what if I generate a1
like this [1,1]
and look it up:
board.has([1,1]) // false, I want this to be true