Closed
Description
TypeScript Version: nightly (2.2.0-dev.20161211)
Code
type Foo = { foo: string, bar?: string };
type X<T> = { [K in keyof T]: any };
type FooX = { [K in keyof Foo]: any };
const a: X<Foo> = { foo: "foo" }; // passed
const b: FooX = { foo: "foo" }; // failed: property 'bar' is missing
Expected behavior:
Both passed or both failed (maybe both passed)
Actual behavior:
Comment in code.