Error 2488 only shown once
See original GitHub issueBug Report
When the error Type '{type}[] | undefined' must have a '[Symbol.iterator]()' method that returns an iterator.(2488)
occurs multiple times in a project it only shows once.
As could be seen in the image above only data_1
has red underline, while I expect to also have red underline by data_2
.
🕗 Version & Regression Information
When using es5 or older both errors are shown, but from es6 only one error shows.
⏯ Playground Link
💻 Code
// using math.random to create type string[] or undefined
const data: string[] | undefined = Math.random() ? [] : undefined;
const data_1 = [...data]; // has a error shown
const data_2 = [...data]; // has no error shown
🙁 Actual behavior
The TypeScript compiler is only returning one of the multiple errors when the error is of type 2488.
🙂 Expected behavior
The TypeScript compiler should return all the locations of the errors, even if they are the same type. This would be handy for code analysis tools.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
2488 ERROR Invalid ShipmentSpecialServiceType [Solution]
This error is shown when you are trying to process an order using FedEx One Rate, but either: FedEx One Rate is not...
Read more >TASCAM 2488 - Error and status messages (v1.00)
If you are using a 2488 with the version 1.00 operat- ing system (as shown when you power up the unit), use the...
Read more >How to fix Error 2488 (You can't use the ApplyFilter action on ...
Runtime Code 2488 happens when Microsoft Access fails or crashes whilst it's running, hence its name. It doesn't necessarily mean that the code...
Read more >Used 2488 nightmare - TASCAM Forums
First of all: the 2488 is not damaged. The error codes are typical for HDD issues. Best thing is you get a new...
Read more >Error Message 2488 - Forums - access-programmers.co.uk
Hi, I have a form with a series of unbound combo boxes to build a search string in the form header. I also...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Even when ignoring the first error the second will still not show. This makes compiling with compile errors (that are not showing) possible.
But when creating a copy both errors show which is interesting.
Thanks for the response @RyanCavanaugh 🙏.
Also without the
@ts-expect-error
family of problems here, tools/users might rely on full error reporting. I believe that is also a design goal.We at StrykerJS rely on a full error report in order to validate multiple mutants at the same time in https://github.com/stryker-mutator/stryker-js/pull/3900.