TypeScript Version: 2.2.1
Code
interfaceFoo{bar: {baz: number;}|null;}typeBaz=Foo["bar"]["baz"];// This doesn't compile with the error: "Property 'baz' does not exist on type '{ baz: number; } | null'."letx: Baz=0;Expected behavior:
I would expect there to be a way to specify bar is non-null, such as Foo["bar!"].
Actual behavior:
The code doesn't compile with the following error message:
"Property 'baz' does not exist on type '{ baz: number; } | null'."
TypeScript Version: 2.2.1
Code
Expected behavior:
I would expect there to be a way to specify
baris non-null, such asFoo["bar!"].Actual behavior:
The code doesn't compile with the following error message:
"Property 'baz' does not exist on type '{ baz: number; } | null'."