26 lines
No EOL
1.3 KiB
Text
26 lines
No EOL
1.3 KiB
Text
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(4,5): error TS1048: A rest parameter cannot have an initializer.
|
|
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(5,5): error TS1003: Identifier expected.
|
|
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(8,12): error TS1016: A required parameter cannot follow an optional parameter.
|
|
|
|
|
|
==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts (5 errors) ====
|
|
(arg1?, arg2) => 101;
|
|
~~~~
|
|
!!! 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;
|
|
~~~
|
|
!!! error TS1048: A rest parameter cannot have an initializer.
|
|
(...) => 105;
|
|
~
|
|
!!! error TS1003: Identifier expected.
|
|
|
|
// Non optional parameter following an optional one
|
|
(arg1 = 1, arg2) => 1;
|
|
~~~~
|
|
!!! error TS1016: A required parameter cannot follow an optional parameter. |