mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
69 lines
2.7 KiB
Plaintext
69 lines
2.7 KiB
Plaintext
//// [tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts] ////
|
|
|
|
=== restParameterWithoutAnnotationIsAnyArray.ts ===
|
|
// Rest parameters without type annotations are 'any', errors only for the functions with 2 rest params
|
|
|
|
function foo(...x) { }
|
|
>foo : Symbol(foo, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 0, 0))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 2, 13))
|
|
|
|
var f = function foo(...x) { }
|
|
>f : Symbol(f, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 3, 3))
|
|
>foo : Symbol(foo, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 3, 7))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 3, 21))
|
|
|
|
var f2 = (...x, ...y) => { }
|
|
>f2 : Symbol(f2, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 4, 3))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 4, 10))
|
|
>y : Symbol(y, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 4, 15))
|
|
|
|
class C {
|
|
>C : Symbol(C, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 4, 28))
|
|
|
|
foo(...x) { }
|
|
>foo : Symbol(C.foo, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 6, 9))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 7, 8))
|
|
}
|
|
|
|
interface I {
|
|
>I : Symbol(I, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 8, 1))
|
|
|
|
(...x);
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 11, 5))
|
|
|
|
foo(...x, ...y);
|
|
>foo : Symbol(I.foo, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 11, 11))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 12, 8))
|
|
>y : Symbol(y, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 12, 13))
|
|
}
|
|
|
|
var a: {
|
|
>a : Symbol(a, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 15, 3))
|
|
|
|
(...x);
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 16, 5))
|
|
|
|
foo(...x);
|
|
>foo : Symbol(foo, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 16, 11))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 17, 8))
|
|
}
|
|
|
|
var b = {
|
|
>b : Symbol(b, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 20, 3))
|
|
|
|
foo(...x) { },
|
|
>foo : Symbol(foo, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 20, 9))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 21, 8))
|
|
|
|
a: function foo(...x, ...y) { },
|
|
>a : Symbol(a, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 21, 18))
|
|
>foo : Symbol(foo, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 22, 6))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 22, 20))
|
|
>y : Symbol(y, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 22, 25))
|
|
|
|
b: (...x) => { }
|
|
>b : Symbol(b, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 22, 36))
|
|
>x : Symbol(x, Decl(restParameterWithoutAnnotationIsAnyArray.ts, 23, 8))
|
|
}
|
|
|