mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
Co-authored-by: Anders Hejlsberg <[email protected]> Co-authored-by: John Favret <[email protected]>
26 lines
751 B
Plaintext
26 lines
751 B
Plaintext
main.js(3,9): error TS2554: Expected 0 arguments, but got 3.
|
|
main.js(6,16): error TS2554: Expected 0-2 arguments, but got 3.
|
|
|
|
|
|
==== main.js (2 errors) ====
|
|
function allRest() { arguments; }
|
|
allRest();
|
|
allRest(1, 2, 3);
|
|
~~~~~~~
|
|
!!! error TS2554: Expected 0 arguments, but got 3.
|
|
function someRest(x, y) { arguments; }
|
|
someRest(); // x and y are still optional because they are in a JS file
|
|
someRest(1, 2, 3);
|
|
~
|
|
!!! error TS2554: Expected 0-2 arguments, but got 3.
|
|
|
|
/**
|
|
* @param {number} x - a thing
|
|
*/
|
|
function jsdocced(x) { arguments; }
|
|
jsdocced(1);
|
|
|
|
function dontDoubleRest(x, ...y) { arguments; }
|
|
dontDoubleRest(1, 2, 3);
|
|
|
|
|