mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
897 B
Diff
30 lines
897 B
Diff
--- old.argumentsObjectCreatesRestForJs.errors.txt
|
|
+++ new.argumentsObjectCreatesRestForJs.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
-<no content>
|
|
+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);
|
|
+
|
|
+
|