Imagine if language had smth like types, and some type called Map, and maybe it had typed key-values, like Map&lt;number, string&gt; which would enforce access with correct type... If only somebody come up with such solution!