I would like to store a mapping of string -> string in a Typescript object, and enforce that all of the keys map to strings. For example:
var stuff = {}; st
Define interface
interface Settings { lang: 'en' | 'da'; welcome: boolean; }
Enforce key to be a specific key of Settings interface
private setSettings(key: keyof Settings, value: any) { // Update settings key }