TypeScript/tests/cases/compiler/contextualPropertyOfGenericMappedType.ts
Matt McCutchen 6c6f216d0d Handle generic mapped types in getTypeOfPropertyOfContextualType. (#27586)
* Handle generic mapped types in getTypeOfPropertyOfContextualType.

The changes to existing baselines look acceptable to me.

Fixes #24694.

* Minor reorganization, add test case from @yortus
2019-03-12 14:13:32 -07:00

6 lines
207 B
TypeScript

// Repro for #24694
// @noImplicitAny: true
declare function f<T extends object>(data: T, handlers: { [P in keyof T]: (value: T[P], prop: P) => void; }): void;
f({ data: 0 }, { data(value, key) {} });