TypeScript/tests/baselines/reference/restParamAsOptional.errors.txt

11 lines
505 B
Plaintext
Raw Normal View History

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.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/restParamAsOptional.ts (2 errors) ====
function f(...x?) { }
~
!!! error TS1047: A rest parameter cannot be optional.
2014-07-13 01:04:16 +02:00
function f2(...x = []) { }
~
!!! error TS1048: A rest parameter cannot have an initializer.