I have this example code:
const example: { [key: string]: string } = { a: 'abc' }
const b = example['b']
At runtime, b would obviously be equal undefined, but at compile type, Typescript infers b type to be just string and not string|undefined. This seems like an error to me.
Why doesn't it infer it as string|undefined, and how can I force it to do so?
