TypeScript/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.types

57 lines
3.1 KiB
Text
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/inferTypeArgumentsInSignatureWithRestParameters.ts ===
function f<T>(array: T[], ...args) { }
2015-04-13 23:01:57 +02:00
>f : <T>(array: T[], ...args: any[]) => void, Symbol(f, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 0))
>T : T, Symbol(T, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 11))
>array : T[], Symbol(array, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 14))
>T : T, Symbol(T, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 11))
>args : any[], Symbol(args, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 25))
2014-08-15 23:33:16 +02:00
function g(array: number[], ...args) { }
2015-04-13 23:01:57 +02:00
>g : (array: number[], ...args: any[]) => void, Symbol(g, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 38))
>array : number[], Symbol(array, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 1, 11))
>args : any[], Symbol(args, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 1, 27))
2014-08-15 23:33:16 +02:00
function h<T>(nonarray: T, ...args) { }
2015-04-13 23:01:57 +02:00
>h : <T>(nonarray: T, ...args: any[]) => void, Symbol(h, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 1, 40))
>T : T, Symbol(T, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 2, 11))
>nonarray : T, Symbol(nonarray, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 2, 14))
>T : T, Symbol(T, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 2, 11))
>args : any[], Symbol(args, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 2, 26))
2014-08-15 23:33:16 +02:00
function i<T>(array: T[], opt?: any[]) { }
2015-04-13 23:01:57 +02:00
>i : <T>(array: T[], opt?: any[]) => void, Symbol(i, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 2, 39))
>T : T, Symbol(T, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 3, 11))
>array : T[], Symbol(array, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 3, 14))
>T : T, Symbol(T, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 3, 11))
>opt : any[], Symbol(opt, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 3, 25))
2014-08-15 23:33:16 +02:00
var a = [1, 2, 3, 4, 5];
2015-04-13 23:01:57 +02:00
>a : number[], Symbol(a, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 4, 3))
2014-08-15 23:33:16 +02:00
>[1, 2, 3, 4, 5] : number[]
2015-04-13 21:36:11 +02:00
>1 : number
>2 : number
>3 : number
>4 : number
>5 : number
2014-08-15 23:33:16 +02:00
f(a); // OK
>f(a) : void
2015-04-13 23:01:57 +02:00
>f : <T>(array: T[], ...args: any[]) => void, Symbol(f, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 0))
>a : number[], Symbol(a, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 4, 3))
2014-08-15 23:33:16 +02:00
g(a); // OK
>g(a) : void
2015-04-13 23:01:57 +02:00
>g : (array: number[], ...args: any[]) => void, Symbol(g, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 0, 38))
>a : number[], Symbol(a, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 4, 3))
2014-08-15 23:33:16 +02:00
h(a); // OK
>h(a) : void
2015-04-13 23:01:57 +02:00
>h : <T>(nonarray: T, ...args: any[]) => void, Symbol(h, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 1, 40))
>a : number[], Symbol(a, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 4, 3))
2014-08-15 23:33:16 +02:00
i(a); // OK
>i(a) : void
2015-04-13 23:01:57 +02:00
>i : <T>(array: T[], opt?: any[]) => void, Symbol(i, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 2, 39))
>a : number[], Symbol(a, Decl(inferTypeArgumentsInSignatureWithRestParameters.ts, 4, 3))
2014-08-15 23:33:16 +02:00