mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Put semantically relevant tokens in the tree.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
tests/cases/compiler/accessorWithRestParam.ts(3,9): error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
tests/cases/compiler/accessorWithRestParam.ts(4,16): error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
tests/cases/compiler/accessorWithRestParam.ts(3,11): error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
tests/cases/compiler/accessorWithRestParam.ts(4,18): error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
|
||||
|
||||
==== tests/cases/compiler/accessorWithRestParam.ts (2 errors) ====
|
||||
|
||||
class C {
|
||||
set X(...v) { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
static set X(...v2) { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(1,9): error TS1016: A required parameter cannot follow an optional parameter.
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(2,5): error TS1047: A rest parameter cannot be optional.
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(2,8): error TS1047: A rest parameter cannot be optional.
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(4,5): error TS1048: A rest parameter cannot have an initializer.
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(7,12): error TS1016: A required parameter cannot follow an optional parameter.
|
||||
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(7,12): error TS1016
|
||||
~~~~
|
||||
!!! error TS1016: A required parameter cannot follow an optional parameter.
|
||||
(...arg?) => 102;
|
||||
~~~
|
||||
~
|
||||
!!! error TS1047: A rest parameter cannot be optional.
|
||||
(...arg) => 103;
|
||||
(...arg:number [] = []) => 104;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(2,27): error TS1016: A required parameter cannot follow an optional parameter.
|
||||
tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(5,38): error TS1016: A required parameter cannot follow an optional parameter.
|
||||
tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(9,28): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(9,25): error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts (3 errors) ====
|
||||
@@ -17,7 +17,7 @@ tests/cases/conformance/functions/functionOverloadErrorsSyntax.ts(9,28): error T
|
||||
|
||||
//Function overload signature with rest param followed by non-optional parameter
|
||||
function fn5(x: string, ...y: any[], z: string);
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
function fn5() { }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/indexSignatureTypeCheck.ts(14,6): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/compiler/indexSignatureTypeCheck.ts(15,9): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/compiler/indexSignatureTypeCheck.ts(14,8): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/compiler/indexSignatureTypeCheck.ts(15,6): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/compiler/indexSignatureTypeCheck.ts(16,6): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/indexSignatureTypeCheck.ts(17,6): error TS1096: An index signature must have exactly one parameter.
|
||||
|
||||
@@ -19,10 +19,10 @@ tests/cases/compiler/indexSignatureTypeCheck.ts(17,6): error TS1096: An index si
|
||||
|
||||
interface indexErrors {
|
||||
[p2?: string];
|
||||
~~
|
||||
~
|
||||
!!! error TS1019: An index signature parameter cannot have a question mark.
|
||||
[...p3: any[]];
|
||||
~~
|
||||
~~~
|
||||
!!! error TS1017: An index signature cannot have a rest parameter.
|
||||
[p4: string, p5?: string];
|
||||
~~
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/indexSignatureTypeCheck2.ts(10,6): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/compiler/indexSignatureTypeCheck2.ts(11,9): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/compiler/indexSignatureTypeCheck2.ts(10,8): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/compiler/indexSignatureTypeCheck2.ts(11,6): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/compiler/indexSignatureTypeCheck2.ts(12,6): error TS1096: An index signature must have exactly one parameter.
|
||||
tests/cases/compiler/indexSignatureTypeCheck2.ts(13,6): error TS1096: An index signature must have exactly one parameter.
|
||||
|
||||
@@ -15,10 +15,10 @@ tests/cases/compiler/indexSignatureTypeCheck2.ts(13,6): error TS1096: An index s
|
||||
|
||||
interface indexErrors {
|
||||
[p2?: string];
|
||||
~~
|
||||
~
|
||||
!!! error TS1019: An index signature parameter cannot have a question mark.
|
||||
[...p3: any[]];
|
||||
~~
|
||||
~~~
|
||||
!!! error TS1017: An index signature cannot have a rest parameter.
|
||||
[p4: string, p5?: string];
|
||||
~~
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
tests/cases/compiler/indexerAsOptional.ts(3,6): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/compiler/indexerAsOptional.ts(8,6): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/compiler/indexerAsOptional.ts(3,9): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/compiler/indexerAsOptional.ts(8,9): error TS1019: An index signature parameter cannot have a question mark.
|
||||
|
||||
|
||||
==== tests/cases/compiler/indexerAsOptional.ts (2 errors) ====
|
||||
interface indexSig {
|
||||
//Index signatures can't be optional
|
||||
[idx?: number]: any; //err
|
||||
~~~
|
||||
~
|
||||
!!! error TS1019: An index signature parameter cannot have a question mark.
|
||||
}
|
||||
|
||||
class indexSig2 {
|
||||
//Index signatures can't be optional
|
||||
[idx?: number]: any //err
|
||||
~~~
|
||||
~
|
||||
!!! error TS1019: An index signature parameter cannot have a question mark.
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
tests/cases/compiler/indexerSignatureWithRestParam.ts(2,9): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/compiler/indexerSignatureWithRestParam.ts(6,9): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/compiler/indexerSignatureWithRestParam.ts(2,6): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/compiler/indexerSignatureWithRestParam.ts(6,6): error TS1017: An index signature cannot have a rest parameter.
|
||||
|
||||
|
||||
==== tests/cases/compiler/indexerSignatureWithRestParam.ts (2 errors) ====
|
||||
interface I {
|
||||
[...x]: string;
|
||||
~
|
||||
~~~
|
||||
!!! error TS1017: An index signature cannot have a rest parameter.
|
||||
}
|
||||
|
||||
class C {
|
||||
[...x]: string
|
||||
~
|
||||
~~~
|
||||
!!! error TS1017: An index signature cannot have a rest parameter.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature1.ts(2,7): error TS1017: An index signature cannot have a rest parameter.
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature1.ts(2,4): error TS1017: An index signature cannot have a rest parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature1.ts (1 errors) ====
|
||||
interface I {
|
||||
[...a]
|
||||
~
|
||||
~~~
|
||||
!!! error TS1017: An index signature cannot have a rest parameter.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature3.ts(2,4): error TS1019: An index signature parameter cannot have a question mark.
|
||||
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature3.ts(2,5): error TS1019: An index signature parameter cannot have a question mark.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature3.ts (1 errors) ====
|
||||
interface I {
|
||||
[a?]
|
||||
~
|
||||
~
|
||||
!!! error TS1019: An index signature parameter cannot have a question mark.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration17.ts(2,8): error TS1051: A 'set' accessor cannot have an optional parameter.
|
||||
tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration17.ts(2,13): error TS1051: A 'set' accessor cannot have an optional parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration17.ts (1 errors) ====
|
||||
class C {
|
||||
set Foo(a?: number) { }
|
||||
~~~
|
||||
~
|
||||
!!! error TS1051: A 'set' accessor cannot have an optional parameter.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration18.ts(2,8): error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration18.ts(2,12): error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/MemberAccessorDeclarations/parserMemberAccessorDeclaration18.ts (1 errors) ====
|
||||
class C {
|
||||
set Foo(...a) { }
|
||||
~~~
|
||||
~~~
|
||||
!!! error TS1053: A 'set' accessor cannot have rest parameter.
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList1.ts(2,9): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList1.ts(2,6): error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList1.ts (1 errors) ====
|
||||
class C {
|
||||
F(...A, B) { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList11.ts(1,5): error TS1047: A rest parameter cannot be optional.
|
||||
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList11.ts(1,8): error TS1047: A rest parameter cannot be optional.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList11.ts (1 errors) ====
|
||||
(...arg?) => 102;
|
||||
~~~
|
||||
~
|
||||
!!! error TS1047: A rest parameter cannot be optional.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList9.ts(2,11): error TS1047: A rest parameter cannot be optional.
|
||||
tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList9.ts(2,14): error TS1047: A rest parameter cannot be optional.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ParameterLists/parserParameterList9.ts (1 errors) ====
|
||||
class C {
|
||||
foo(...bar?) { }
|
||||
~~~
|
||||
~
|
||||
!!! error TS1047: A rest parameter cannot be optional.
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
tests/cases/compiler/restParamAsOptional.ts(1,15): error TS1047: A rest parameter cannot be optional.
|
||||
tests/cases/compiler/restParamAsOptional.ts(1,16): error TS1047: A rest parameter cannot be optional.
|
||||
tests/cases/compiler/restParamAsOptional.ts(2,16): error TS1048: A rest parameter cannot have an initializer.
|
||||
|
||||
|
||||
==== tests/cases/compiler/restParamAsOptional.ts (2 errors) ====
|
||||
function f(...x?) { }
|
||||
~
|
||||
~
|
||||
!!! error TS1047: A rest parameter cannot be optional.
|
||||
function f2(...x = []) { }
|
||||
~
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
tests/cases/compiler/restParameterNotLast.ts(1,15): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/compiler/restParameterNotLast.ts(1,12): error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
|
||||
==== tests/cases/compiler/restParameterNotLast.ts (1 errors) ====
|
||||
function f(...x, y) { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts(5,14): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts(13,12): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts(23,24): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts(5,11): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts(13,9): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts(23,21): error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWithoutAnnotationIsAnyArray.ts (3 errors) ====
|
||||
@@ -9,7 +9,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWith
|
||||
function foo(...x) { }
|
||||
var f = function foo(...x) { }
|
||||
var f2 = (...x, ...y) => { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
class C {
|
||||
@@ -19,7 +19,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWith
|
||||
interface I {
|
||||
(...x);
|
||||
foo(...x, ...y);
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParameterWith
|
||||
var b = {
|
||||
foo(...x) { },
|
||||
a: function foo(...x, ...y) { },
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
b: (...x) => { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(5,14): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(13,12): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(23,24): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(5,11): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(13,9): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(23,21): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(3,14): error TS2370: A rest parameter must be of an array type.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(4,22): error TS2370: A rest parameter must be of an array type.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes.ts(5,11): error TS2370: A rest parameter must be of an array type.
|
||||
@@ -27,7 +27,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
var f2 = (...x: Date, ...y: boolean) => { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
@@ -45,7 +45,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
foo(...x: number, ...y: number);
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
@@ -67,7 +67,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
a: function foo(...x: number, ...y: Date) { },
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(9,14): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(17,12): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(27,24): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(36,14): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(44,12): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(54,24): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(9,11): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(17,9): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(27,21): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(36,11): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(44,9): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(54,21): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(7,14): error TS2370: A rest parameter must be of an array type.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(8,22): error TS2370: A rest parameter must be of an array type.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfNonArrayTypes2.ts(9,11): error TS2370: A rest parameter must be of an array type.
|
||||
@@ -48,7 +48,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
var f2 = (...x: MyThing, ...y: MyThing) => { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
@@ -66,7 +66,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
foo(...x: MyThing, ...y: MyThing);
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
@@ -88,7 +88,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
a: function foo(...x: MyThing, ...y: MyThing) { },
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
@@ -109,7 +109,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
var f4 = (...x: MyThing2<string>, ...y: MyThing2<string>) => { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
@@ -127,7 +127,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
foo(...x: MyThing2<string>, ...y: MyThing2<string>);
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
@@ -149,7 +149,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersOfN
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
a: function foo(...x: MyThing2<string>, ...y: MyThing2<string>) { },
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2370: A rest parameter must be of an array type.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(5,14): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(13,12): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(23,24): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(32,14): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(40,12): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(50,24): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(5,11): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(13,9): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(23,21): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(32,11): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(40,9): error TS1014: A rest parameter must be last in a parameter list.
|
||||
tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts(50,21): error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWithArrayTypeAnnotations.ts (6 errors) ====
|
||||
@@ -12,7 +12,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWit
|
||||
function foo(...x: number[]) { }
|
||||
var f = function foo(...x: number[]) { }
|
||||
var f2 = (...x: number[], ...y: number[]) => { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
class C {
|
||||
@@ -22,7 +22,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWit
|
||||
interface I {
|
||||
(...x: number[]);
|
||||
foo(...x: number[], ...y: number[]);
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWit
|
||||
var b = {
|
||||
foo(...x: number[]) { },
|
||||
a: function foo(...x: number[], ...y: number[]) { },
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
b: (...x: number[]) => { }
|
||||
}
|
||||
@@ -45,7 +45,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWit
|
||||
function foo2(...x: Array<string>) { }
|
||||
var f3 = function foo(...x: Array<string>) { }
|
||||
var f4 = (...x: Array<string>, ...y: Array<string>) => { }
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
|
||||
class C2 {
|
||||
@@ -55,7 +55,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWit
|
||||
interface I2 {
|
||||
(...x: Array<string>);
|
||||
foo(...x: Array<string>, ...y: Array<string>);
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ tests/cases/conformance/types/objectTypeLiteral/callSignatures/restParametersWit
|
||||
var b2 = {
|
||||
foo(...x: Array<string>) { },
|
||||
a: function foo(...x: Array<string>, ...y: Array<string>) { },
|
||||
~
|
||||
~~~
|
||||
!!! error TS1014: A rest parameter must be last in a parameter list.
|
||||
b: (...x: Array<string>) => { }
|
||||
}
|
||||
Reference in New Issue
Block a user