|
| 1 | +//// [tests/cases/compiler/contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts] //// |
| 2 | + |
| 3 | +=== contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts === |
| 4 | +// https://github.com/microsoft/TypeScript/issues/62336 |
| 5 | + |
| 6 | +declare function call<T>(fn: (a: string, b: T) => unknown): (b: T) => unknown; |
| 7 | +>call : Symbol(call, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 0, 0)) |
| 8 | +>T : Symbol(T, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 22)) |
| 9 | +>fn : Symbol(fn, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 25)) |
| 10 | +>a : Symbol(a, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 30)) |
| 11 | +>b : Symbol(b, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 40)) |
| 12 | +>T : Symbol(T, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 22)) |
| 13 | +>b : Symbol(b, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 61)) |
| 14 | +>T : Symbol(T, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 22)) |
| 15 | + |
| 16 | +declare function fn<Args extends any[]>( |
| 17 | +>fn : Symbol(fn, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 78)) |
| 18 | +>Args : Symbol(Args, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 4, 20)) |
| 19 | + |
| 20 | + fn: (...args: Args) => unknown, |
| 21 | +>fn : Symbol(fn, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 4, 40)) |
| 22 | +>args : Symbol(args, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 5, 7)) |
| 23 | +>Args : Symbol(Args, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 4, 20)) |
| 24 | + |
| 25 | +): (...args: Args) => unknown; |
| 26 | +>args : Symbol(args, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 6, 4)) |
| 27 | +>Args : Symbol(Args, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 4, 20)) |
| 28 | + |
| 29 | +call( |
| 30 | +>call : Symbol(call, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 0, 0)) |
| 31 | + |
| 32 | + fn(function (a, b: number) { |
| 33 | +>fn : Symbol(fn, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 2, 78)) |
| 34 | +>a : Symbol(a, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 9, 15)) |
| 35 | +>b : Symbol(b, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 9, 17)) |
| 36 | + |
| 37 | + a; // string |
| 38 | +>a : Symbol(a, Decl(contextuallyTypeParametersUsingInstantiantedRestReturnMapper1.ts, 9, 15)) |
| 39 | + |
| 40 | + }), |
| 41 | +); |
| 42 | + |
0 commit comments