7 lines
286 B
Plaintext
7 lines
286 B
Plaintext
==== tests/cases/compiler/restParamAsOptional.ts (2 errors) ====
|
|
function f(...x?) { }
|
|
~
|
|
!!! error TS1047: A rest parameter cannot be optional.
|
|
function f2(...x = []) { }
|
|
~
|
|
!!! error TS1048: A rest parameter cannot have an initializer. |