@@ -19,46 +19,61 @@ declare function foo<T extends any[]>(arg: T): { hi: T };
19
19
>hi : Symbol(hi, Decl(dontWiden.ts, 4, 48))
20
20
>T : Symbol(T, Decl(dontWiden.ts, 4, 21))
21
21
22
+ declare function boo<T extends number[]>(arg: T): { hi: T };
23
+ >boo : Symbol(boo, Decl(dontWiden.ts, 4, 57))
24
+ >T : Symbol(T, Decl(dontWiden.ts, 5, 21))
25
+ >arg : Symbol(arg, Decl(dontWiden.ts, 5, 41))
26
+ >T : Symbol(T, Decl(dontWiden.ts, 5, 21))
27
+ >hi : Symbol(hi, Decl(dontWiden.ts, 5, 51))
28
+ >T : Symbol(T, Decl(dontWiden.ts, 5, 21))
29
+
22
30
declare function bar(arg: SomeInterface): void
23
- >bar : Symbol(bar, Decl(dontWiden.ts, 4, 57 ))
24
- >arg : Symbol(arg, Decl(dontWiden.ts, 5 , 21))
31
+ >bar : Symbol(bar, Decl(dontWiden.ts, 5, 60 ))
32
+ >arg : Symbol(arg, Decl(dontWiden.ts, 6 , 21))
25
33
>SomeInterface : Symbol(SomeInterface, Decl(dontWiden.ts, 1, 27))
26
34
27
35
declare function baz(arg: [number, 2, 3 | number]): void
28
- >baz : Symbol(baz, Decl(dontWiden.ts, 5 , 46))
29
- >arg : Symbol(arg, Decl(dontWiden.ts, 6 , 21))
36
+ >baz : Symbol(baz, Decl(dontWiden.ts, 6 , 46))
37
+ >arg : Symbol(arg, Decl(dontWiden.ts, 7 , 21))
30
38
31
39
declare function bag(arg: number[]): void
32
- >bag : Symbol(bag, Decl(dontWiden.ts, 6 , 56))
33
- >arg : Symbol(arg, Decl(dontWiden.ts, 7 , 21))
40
+ >bag : Symbol(bag, Decl(dontWiden.ts, 7 , 56))
41
+ >arg : Symbol(arg, Decl(dontWiden.ts, 8 , 21))
34
42
35
43
// As variable assignees
36
44
const a: number[] = [1, 2, 3];
37
- >a : Symbol(a, Decl(dontWiden.ts, 10 , 5))
45
+ >a : Symbol(a, Decl(dontWiden.ts, 11 , 5))
38
46
39
47
const b: SomeInterface = {a: true};
40
- >b : Symbol(b, Decl(dontWiden.ts, 11 , 5))
48
+ >b : Symbol(b, Decl(dontWiden.ts, 12 , 5))
41
49
>SomeInterface : Symbol(SomeInterface, Decl(dontWiden.ts, 1, 27))
42
- >a : Symbol(a, Decl(dontWiden.ts, 11 , 26))
50
+ >a : Symbol(a, Decl(dontWiden.ts, 12 , 26))
43
51
44
52
const e = [1, 2, 3];
45
- >e : Symbol(e, Decl(dontWiden.ts, 12 , 5))
53
+ >e : Symbol(e, Decl(dontWiden.ts, 13 , 5))
46
54
47
55
// Same, but as arguments
48
56
foo([1, 2, 3]);
49
57
>foo : Symbol(foo, Decl(dontWiden.ts, 3, 38))
50
58
51
59
bar({a: true});
52
- >bar : Symbol(bar, Decl(dontWiden.ts, 4, 57 ))
53
- >a : Symbol(a, Decl(dontWiden.ts, 16 , 5))
60
+ >bar : Symbol(bar, Decl(dontWiden.ts, 5, 60 ))
61
+ >a : Symbol(a, Decl(dontWiden.ts, 17 , 5))
54
62
55
63
baz([1, 2, 3]);
56
- >baz : Symbol(baz, Decl(dontWiden.ts, 5 , 46))
64
+ >baz : Symbol(baz, Decl(dontWiden.ts, 6 , 46))
57
65
58
66
bag([1, 2, 3]);
59
- >bag : Symbol(bag, Decl(dontWiden.ts, 6 , 56))
67
+ >bag : Symbol(bag, Decl(dontWiden.ts, 7 , 56))
60
68
61
69
bag(e);
62
- >bag : Symbol(bag, Decl(dontWiden.ts, 6, 56))
63
- >e : Symbol(e, Decl(dontWiden.ts, 12, 5))
70
+ >bag : Symbol(bag, Decl(dontWiden.ts, 7, 56))
71
+ >e : Symbol(e, Decl(dontWiden.ts, 13, 5))
72
+
73
+ boo([1, 2, 3]);
74
+ >boo : Symbol(boo, Decl(dontWiden.ts, 4, 57))
75
+
76
+ boo(e);
77
+ >boo : Symbol(boo, Decl(dontWiden.ts, 4, 57))
78
+ >e : Symbol(e, Decl(dontWiden.ts, 13, 5))
64
79
0 commit comments