@@ -26,3 +26,49 @@ const f4: (...args: [type: "one", x?: number] | [type: "two", x: string]) => voi
26
26
>type : Symbol(type, Decl(restTupleUnionWithRestContextualParams.ts, 6, 85))
27
27
>x : Symbol(x, Decl(restTupleUnionWithRestContextualParams.ts, 6, 90))
28
28
29
+ // #45972
30
+ type Fn1 = (...args: [...strs: string[], num1: number, num2: number]) => void;
31
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
32
+ >args : Symbol(args, Decl(restTupleUnionWithRestContextualParams.ts, 9, 12))
33
+
34
+ const f5: Fn1 = () => {}
35
+ >f5 : Symbol(f5, Decl(restTupleUnionWithRestContextualParams.ts, 10, 5))
36
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
37
+
38
+ const f6: Fn1 = (arg1) => {}
39
+ >f6 : Symbol(f6, Decl(restTupleUnionWithRestContextualParams.ts, 11, 5))
40
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
41
+ >arg1 : Symbol(arg1, Decl(restTupleUnionWithRestContextualParams.ts, 11, 17))
42
+
43
+ const f7: Fn1 = (arg1, arg2) => {}
44
+ >f7 : Symbol(f7, Decl(restTupleUnionWithRestContextualParams.ts, 12, 5))
45
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
46
+ >arg1 : Symbol(arg1, Decl(restTupleUnionWithRestContextualParams.ts, 12, 17))
47
+ >arg2 : Symbol(arg2, Decl(restTupleUnionWithRestContextualParams.ts, 12, 22))
48
+
49
+ const f8: Fn1 = (arg1, arg2, arg3) => {}
50
+ >f8 : Symbol(f8, Decl(restTupleUnionWithRestContextualParams.ts, 13, 5))
51
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
52
+ >arg1 : Symbol(arg1, Decl(restTupleUnionWithRestContextualParams.ts, 13, 17))
53
+ >arg2 : Symbol(arg2, Decl(restTupleUnionWithRestContextualParams.ts, 13, 22))
54
+ >arg3 : Symbol(arg3, Decl(restTupleUnionWithRestContextualParams.ts, 13, 28))
55
+
56
+ // #45972#issuecomment-1140417029
57
+ const f9: Fn1 = (...[arg1]: [string | number]) => {}
58
+ >f9 : Symbol(f9, Decl(restTupleUnionWithRestContextualParams.ts, 16, 5))
59
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
60
+ >arg1 : Symbol(arg1, Decl(restTupleUnionWithRestContextualParams.ts, 16, 21))
61
+
62
+ const f10: Fn1 = (...[arg1, arg2]: [string | number, string | number]) => {}
63
+ >f10 : Symbol(f10, Decl(restTupleUnionWithRestContextualParams.ts, 17, 5))
64
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
65
+ >arg1 : Symbol(arg1, Decl(restTupleUnionWithRestContextualParams.ts, 17, 22))
66
+ >arg2 : Symbol(arg2, Decl(restTupleUnionWithRestContextualParams.ts, 17, 27))
67
+
68
+ const f11: Fn1 = (...[arg1, arg2, arg3]: [string | number, string | number, string | number]) => {}
69
+ >f11 : Symbol(f11, Decl(restTupleUnionWithRestContextualParams.ts, 18, 5))
70
+ >Fn1 : Symbol(Fn1, Decl(restTupleUnionWithRestContextualParams.ts, 6, 99))
71
+ >arg1 : Symbol(arg1, Decl(restTupleUnionWithRestContextualParams.ts, 18, 22))
72
+ >arg2 : Symbol(arg2, Decl(restTupleUnionWithRestContextualParams.ts, 18, 27))
73
+ >arg3 : Symbol(arg3, Decl(restTupleUnionWithRestContextualParams.ts, 18, 33))
74
+
0 commit comments