-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Debug Failure. Parameter symbol already has a cached type which differs from newly assigned type. #50773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Seeing this same issue on 4.7.2 (and latest, 4.8.4). Switching to 4.6.4 remedied the problem, but definitely less than ideal. |
I've been stuck on ts And since the error only gives a path to typescript internals: Also with Which part of your code causes the error exactly? And which from: #49383? See also this duplicate (now closed) issue: #49966 it mentions the lack of error message that you would normally expect to be able to debug. ( It seems the error was meant for internal typescript-library development use, not for outside "consumer-devs"? However in practice this error also occurs outside of the internal development) |
I've just ran into this issue on It seems to be related to implicit inferred types? Given that explicitly setting the same type as it infers causes it to be fixed on 4.9.3... |
I ran into this when upgrading TS from 4.2.3 to 4.9.3 on a large internal project. I can't boil it down to a reproducable set of code, but here are the steps I followed to find the offending section of code so I could refactor how the types were specified.
At the top of the output was a path to the file that was last processed. I was then able to comment out all of the code in the file, verify that the compile was successful and then slowly reintroduce code until necessary. In my case, I was able to add an explicit type to a generic function that was trying to do type inference. You can read more about that analyze-trace tool here |
Hi, I know the file where the issue happens (here), but have no idea how to fix this. And unlike others, I'm on TS 5.2.2 Happy to help investigating this, just don't really know how. On my local machine, it's a heisenbug :( |
This was fixed in TypeScript 5.0. @marekdedic if you can still reproduce a bug with the same error message, please file a new issue with some repro steps. The logs from the CI run you linked have expired. Thanks! |
Thanks for the response, unfortunately, I am still getting this with TS 5.3. I filed a new issue (#57435) with a repro. Could you please take a look at it there and let me know if there's anything more you need? |
Bug Report
🔎 Search Terms
Error: Debug Failure. Expected [object Object] === [object Object]. Parameter symbol already has a cached type which differs from newly assigned type
🕗 Version & Regression Information
⏯ Playground Link
Can't reproduce in the playgorund. To reproduce, run:
💻 Code
code.js
🙁 Actual behavior
🙂 Expected behavior
No crash
The text was updated successfully, but these errors were encountered: