56 lines
2.7 KiB
Text
56 lines
2.7 KiB
Text
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(6,14): error TS1181: Array element destructuring pattern expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(6,19): error TS1005: '(' expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(6,21): error TS1109: Expression expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(6,24): error TS1005: '(' expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(6,26): error TS2304: Cannot find name 'public'.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(6,32): error TS1005: ';' expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(6,33): error TS1128: Declaration or statement expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(7,16): error TS1003: Identifier expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(7,21): error TS1005: '(' expected.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(9,13): error TS2370: A rest parameter must be of an array type.
|
||
|
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts(12,24): error TS1005: ',' expected.
|
||
|
|
||
|
|
||
|
==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration2ES6.ts (11 errors) ====
|
||
|
"use strict"
|
||
|
function a({while}) { }
|
||
|
function a1({public}) { }
|
||
|
function a2({public: x}) { }
|
||
|
function a3({while: y}) { }
|
||
|
function a4([while, for, public]){ }
|
||
|
~~~~~
|
||
|
!!! error TS1181: Array element destructuring pattern expected.
|
||
|
~
|
||
|
!!! error TS1005: '(' expected.
|
||
|
~~~
|
||
|
!!! error TS1109: Expression expected.
|
||
|
~
|
||
|
!!! error TS1005: '(' expected.
|
||
|
~~~~~~
|
||
|
!!! error TS2304: Cannot find name 'public'.
|
||
|
~
|
||
|
!!! error TS1005: ';' expected.
|
||
|
~
|
||
|
!!! error TS1128: Declaration or statement expected.
|
||
|
function a5(...while) { }
|
||
|
~~~~~
|
||
|
!!! error TS1003: Identifier expected.
|
||
|
~
|
||
|
!!! error TS1005: '(' expected.
|
||
|
function a6(...public) { }
|
||
|
function a7(...a: string) { }
|
||
|
~~~~~~~~~~~~
|
||
|
!!! error TS2370: A rest parameter must be of an array type.
|
||
|
|
||
|
class C {
|
||
|
constructor(public ...a) { }
|
||
|
~~~
|
||
|
!!! error TS1005: ',' expected.
|
||
|
}
|
||
|
|
||
|
|
||
|
a2({ public: 1 });
|
||
|
a3({ while: 1 });
|
||
|
a({ while: 1 });
|
||
|
|
||
|
|