@@ -44,3 +44,27 @@ type Generic = Bind1<MyFunctionType>; // (bar: string) => boolean
44
44
>Bind1 : Symbol(Bind1, Decl(genericRestTypes.ts, 8, 90))
45
45
>MyFunctionType : Symbol(MyFunctionType, Decl(genericRestTypes.ts, 4, 110))
46
46
47
+ function assignmentWithComplexRest<T extends any[]>() {
48
+ >assignmentWithComplexRest : Symbol(assignmentWithComplexRest, Decl(genericRestTypes.ts, 11, 37))
49
+ >T : Symbol(T, Decl(genericRestTypes.ts, 13, 35))
50
+
51
+ const fn1: (x: string, ...rest: T) => void = (x, ..._) => x;
52
+ >fn1 : Symbol(fn1, Decl(genericRestTypes.ts, 14, 9))
53
+ >x : Symbol(x, Decl(genericRestTypes.ts, 14, 16))
54
+ >rest : Symbol(rest, Decl(genericRestTypes.ts, 14, 26))
55
+ >T : Symbol(T, Decl(genericRestTypes.ts, 13, 35))
56
+ >x : Symbol(x, Decl(genericRestTypes.ts, 14, 50))
57
+ >_ : Symbol(_, Decl(genericRestTypes.ts, 14, 52))
58
+ >x : Symbol(x, Decl(genericRestTypes.ts, 14, 50))
59
+
60
+ const fn2: (...args: never) => void = fn1;
61
+ >fn2 : Symbol(fn2, Decl(genericRestTypes.ts, 15, 9))
62
+ >args : Symbol(args, Decl(genericRestTypes.ts, 15, 16))
63
+ >fn1 : Symbol(fn1, Decl(genericRestTypes.ts, 14, 9))
64
+
65
+ type Fn2Ret = ReturnType<typeof fn2>;
66
+ >Fn2Ret : Symbol(Fn2Ret, Decl(genericRestTypes.ts, 15, 46))
67
+ >ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
68
+ >fn2 : Symbol(fn2, Decl(genericRestTypes.ts, 15, 9))
69
+ }
70
+
0 commit comments