I find myself using `{[key: string]: mixed}` so much for dynamicish data that I feel like Flow/TypeScript should make it a built-in.
An object with numeric keys is just an object with coerced string keys. I hate mixing my types like that and hiding it behind coercion so seems better to either always use an array or a Map.
-
-
That's true! If they aren't ordered, arrays don't make much sense though, and I never remember how Map works so I typically use objects.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 