Closed
Description
TypeScript Version: 2.8.3
Search Terms: object type undefined
Code
interface Foo {
[_: string]: number
}
const foo: Foo = {}
// foo.abc is undefined, but TypeScript allows this
foo.abc.toString()
Expected behavior:
Object is possibly undefined
Actual behavior:
TypeScript allows it
Playground Link: link
Related Issues: