I was wondering, what is the most convenient way to invert keys and values in a Map. Is there any builtin method or should it be done by iterating over keys and values?
const map: Map<string, number> = new Map()
const inverse: Map<number, string>