Can a key in a key:value pair have a non-row type in?

I argued with my mentor that the key in the key: value pair can be not only a string. On my side there is VS Code in which you can put a number in a key and then get the value using this key. On his side there are various articles and notes where it is written that the key can only be a string. Someone can either credibly argue my side, or if I’m wrong, his side.

Attaching a photo from VS Code:enter image description here