interface Dict { [key: string]: number }
const d: Dict = { a: 1, b: 2 }
d['c'] = 3An index signature [key: string]: T allows any string key while enforcing a value type.
An index signature { [key: string]: string } allows an object to have any string keys, all pointing to the same value type.
Challenge: Implement createDict() returning an empty dictionary { [key: string]: string }.
const d = createDict()
d['hello'] = 'world'
d['hello'] // β 'world'