Skip to content

Commit 6b024f6

Browse files
committed
Test:XMLHttpRequest inference to PartialDeep<T>
Compilation didn't finish before! Now it does.
1 parent 05de0a7 commit 6b024f6

4 files changed

Lines changed: 28 additions & 0 deletions

File tree

tests/baselines/reference/mappedTypeRecursiveInference.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ declare let a: A;
44
type Deep<T> = { [K in keyof T]: Deep<T[K]> }
55
declare function foo<T>(deep: Deep<T>): T;
66
const out = foo(a);
7+
8+
let xhr: XMLHttpRequest;
9+
const out2 = foo(xhr);
710

811

912
//// [mappedTypeRecursiveInference.js]
1013
var out = foo(a);
14+
var xhr;
15+
var out2 = foo(xhr);

tests/baselines/reference/mappedTypeRecursiveInference.symbols

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ const out = foo(a);
3030
>foo : Symbol(foo, Decl(mappedTypeRecursiveInference.ts, 2, 45))
3131
>a : Symbol(a, Decl(mappedTypeRecursiveInference.ts, 1, 11))
3232

33+
let xhr: XMLHttpRequest;
34+
>xhr : Symbol(xhr, Decl(mappedTypeRecursiveInference.ts, 6, 3))
35+
>XMLHttpRequest : Symbol(XMLHttpRequest, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
36+
37+
const out2 = foo(xhr);
38+
>out2 : Symbol(out2, Decl(mappedTypeRecursiveInference.ts, 7, 5))
39+
>foo : Symbol(foo, Decl(mappedTypeRecursiveInference.ts, 2, 45))
40+
>xhr : Symbol(xhr, Decl(mappedTypeRecursiveInference.ts, 6, 3))
41+

tests/baselines/reference/mappedTypeRecursiveInference.types

Lines changed: 10 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
// @lib: es6, dom
12
interface A { a: A }
23
declare let a: A;
34
type Deep<T> = { [K in keyof T]: Deep<T[K]> }
45
declare function foo<T>(deep: Deep<T>): T;
56
const out = foo(a);
7+
8+
let xhr: XMLHttpRequest;
9+
const out2 = foo(xhr);

0 commit comments

Comments
 (0)