You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// A *self-contained* demonstration of the problem follows...interfaceTest{a?: number;b?: string;}interfaceTestWithStrictProp{a?: number;b?: string;c: string;}interfaceTestIndex{[key: string]: Test;}interfaceTestIndexWithStrict{[key: string]: TestWithStrictProp;}declarefunctiontestFunc<TextendsTestIndex>(t: T): void;declarefunctiontestFuncStrict<TextendsTestIndexWithStrict>(t: T): void;
Consumer code
testFunc({test: {// Compiler doesn't see properties here}});testFuncStrict({test: {// Compiler see a?, b? and c}});
Expected behavior:
Completion in testFunc({ test: { ... } });
The text was updated successfully, but these errors were encountered:
RyanCavanaugh
changed the title
TS loosing optional properties when used with index signature and generics
TS losing optional properties when used with index signature and generics
Jul 22, 2016
TypeScript Version: 2.0.0-beta
Code
Base code:
Consumer code
Expected behavior:
Completion in testFunc({ test: { ... } });
The text was updated successfully, but these errors were encountered: