2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(1,9): error TS1016: A required parameter cannot follow an optional parameter.
|
2014-12-02 07:03:41 +01:00
|
|
|
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(2,8): error TS1047: A rest parameter cannot be optional.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(4,5): error TS1048: A rest parameter cannot have an initializer.
|
2014-11-19 02:42:32 +01:00
|
|
|
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(7,12): error TS1016: A required parameter cannot follow an optional parameter.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-11-19 02:42:32 +01:00
|
|
|
==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts (4 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
(arg1?, arg2) => 101;
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1016: A required parameter cannot follow an optional parameter.
|
2014-07-13 01:04:16 +02:00
|
|
|
(...arg?) => 102;
|
2014-12-02 07:03:41 +01:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1047: A rest parameter cannot be optional.
|
2014-07-13 01:04:16 +02:00
|
|
|
(...arg) => 103;
|
|
|
|
(...arg:number [] = []) => 104;
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1048: A rest parameter cannot have an initializer.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
// Non optional parameter following an optional one
|
|
|
|
(arg1 = 1, arg2) => 1;
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1016: A required parameter cannot follow an optional parameter.
|