File: reverseMappedContravariantInference.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (21 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (5)
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))