We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2450c19 commit d96d16eCopy full SHA for d96d16e
tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts
@@ -32,6 +32,17 @@ const d1 = f4("abc");
32
const d2 = f4(s);
33
const d3 = f4(42); // Error
34
35
+export interface Foo<T> {
36
+ then<U>(f: (x: T) => U | Foo<U>, g: U): Foo<U>;
37
+}
38
+export interface Bar<T> {
39
+ then<S>(f: (x: T) => S | Bar<S>, g: S): Bar<S>;
40
41
+
42
+function qux(p1: Foo<void>, p2: Bar<void>) {
43
+ p1 = p2;
44
45
46
// Repros from #32434
47
48
declare function foo<T>(x: T | Promise<T>): void;
0 commit comments