TypeScript/tests/cases/compiler/reverseMappedContravariantInference.ts

7 lines
210 B
TypeScript
Raw Normal View History

2018-01-19 02:28:37 +01:00
// @strict: true
// Repro from #21273
declare function conforms<T>(source: { [K in keyof T]: (val: T[K]) => boolean }): (value: T) => boolean;
conforms({ foo: (v: string) => false })({ foo: "hello" });