1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
=== tests/cases/compiler/reverseMappedContravariantInference.ts ===
// Repro from #21273
declare function conforms<T>(source: { [K in keyof T]: (val: T[K]) => boolean }): (value: T) => boolean;
>conforms : Symbol(conforms, Decl(reverseMappedContravariantInference.ts, 0, 0))
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
>source : Symbol(source, Decl(reverseMappedContravariantInference.ts, 2, 29))
>K : Symbol(K, Decl(reverseMappedContravariantInference.ts, 2, 40))
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
>val : Symbol(val, Decl(reverseMappedContravariantInference.ts, 2, 56))
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
>K : Symbol(K, Decl(reverseMappedContravariantInference.ts, 2, 40))
>value : Symbol(value, Decl(reverseMappedContravariantInference.ts, 2, 83))
>T : Symbol(T, Decl(reverseMappedContravariantInference.ts, 2, 26))
conforms({ foo: (v: string) => false })({ foo: "hello" });
>conforms : Symbol(conforms, Decl(reverseMappedContravariantInference.ts, 0, 0))
>foo : Symbol(foo, Decl(reverseMappedContravariantInference.ts, 3, 10))
>v : Symbol(v, Decl(reverseMappedContravariantInference.ts, 3, 17))
>foo : Symbol(foo, Decl(reverseMappedContravariantInference.ts, 3, 41))
|