We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08cd0b3 commit 22475e8Copy full SHA for 22475e8
1 file changed
tests/cases/compiler/contravariantTypeAliasInference.ts
@@ -0,0 +1,19 @@
1
+// @strict: true
2
+
3
+type Func1<T> = (x: T) => void;
4
+type Func2<T> = ((x: T) => void) | undefined;
5
6
+declare let f1: Func1<string>;
7
+declare let f2: Func1<"a">;
8
9
+declare function foo<T>(f1: Func1<T>, f2: Func1<T>): void;
10
11
+foo(f1, f2);
12
13
+declare let g1: Func2<string>;
14
+declare let g2: Func2<"a">;
15
16
+declare function bar<T>(g1: Func2<T>, g2: Func2<T>): void;
17
18
+bar(f1, f2);
19
+bar(g1, g2);
0 commit comments