Closed
Description
TypeScript Version: 2.3.0-dev.20170223
Code
It's very likely that this is already reported, but I couldn't find it after a quick search through the issues.
type Foo = {
bar: string
__typename: string
}
type A = Foo["bar"] // ok
type B = Foo["__typename"] // Property '__typename' does not exist on type 'Foo'.
Expected behavior:
Type B
should be string
.
Actual behavior:
Error is thrown.