So another 🤯 about TypeScript. We use plain objects as arbitrary maps all the time, but TypeScript deems that usage (correctly) too flexible.
const map = {};
map.foo = 'foo'; // Error: Property 'foo' does not exist on type '{}'.
Okay, then we need to type our object as a map: