TypeScript/tests/cases/compiler/reverseMappedContravariantInference.ts
2018-01-18 17:28:37 -08:00

7 lines
210 B
TypeScript

// @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" });