-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Confusing error messages: expected N argumentsΒ #42891
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this
Milestone
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingThe issue relates to error messagingEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this
Bug Report
π Search Terms
error, arguments, overloads
β― Playground Link
Playground link with relevant code
π» Code
Reduced from https://github.com/elibarzilay/process-tracing/blob/59a790c839258ee737481edad0a614f094a1d68c/index.js
There are several weird things going on here:
fs.createWriteStream(output)is squiggled and the error produced isExpected at least 1 arguments, but got 6 or more.There are no elaborations. I have no idea what's actually wrong.async function *argument, the new error isNo overload expects 4 arguments, but overloads do exist that expect either 4 or Infinity arguments.The phrasing "4 or Infinity" is strange, the value 4 is both expected and not expected, and it's not clear where 4 actually comes from (maybe it assumes each spread is empty?).Expected at least 1 arguments, but got 4 or more.