Closed Dessix closed 8 years ago
Hmm so you're right that we don't need to use Map
directly in the game. But the main problem I'm concerned with right now is that renaming type Map
to something else will break current code of anyone typing their code with Map
. Note that interestingly, while Map
is an ES6 construct, it's not actually in Typescript yet. Any suggestion?
Map is in typescript so far as I can see: (At least when the target is ES6, I haven't checked on an ES5 target)
But from what I've seen, Screeps Map
is not accessible globally because the ES6 Map
constructor overrides it. If this would break backward compatibility, the Node upgrade already beat it to the punch.
It's changed to GameMap now! Please let me know if there is any other issue.
It seems that, since the definition for
Map
has no accessible constructor, we should be able to just rename it to something that doesn't conflict, so theMap
type is usable for non-string dictionary keys?