-
Notifications
You must be signed in to change notification settings - Fork 12.8k
3.6 regression: error TS2321: Excessive stack depth comparing types 'Function<?>' and 'Function<?>'.
#33132
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
Conditional types now evaluate more eagerly than before, which means that the assignability cutoff gets hit more. I think this is likely by design, but we should investigate before closing. |
Actually, this has zero to do with conditional types (which iirc we didn't actually change all that much this release), but everything to do with mapped types and indexed accesses. Specifically, We probably introduced this in #32071. I think this is fixable with existing mechanisms - we already recognize that the |
+1 issue with typeorm in 3.6.2. Rolling back to 3.5 helps. |
Uprading from 3.5.3 to 3.6.2 gives me this error:
Unfortunately it does not give me any hint on which dependency is causing this, but all of them are on the latest version available at time of this posting. |
If anyone having trouble with this could try out the build (that will soon be posted) in #33144 (comment) and report back/updoot if it fixed your problem, that'd be great. Based on what I've been given, I believe it should, but more input is always appreciated. |
This fixes the issue for me thanks. |
This fixed it for me (or rather for us @OliverJAsh) as well. (Just a side note: @weswigham I think you meant this comment since that's the one with installation instructions.) |
@weswigham It fixes all the problems for me. Huge thanks! |
I was affected by typeorm/typeorm#4662 and this fixed it for me, thanks! |
I can confirm, 3.7.0-insiders.20190902 fixes the issue I posted above. |
I am facing the issue with [email protected] with typescript@latest. Following is the error for your reference
|
I have got the solution.This 33259 solution worked for the time being and we need the proper solution which will support the latest versions of the typescript. |
@weswigham That indeed fixed it for me! Thanks! |
Can you all try out |
Works for me thanks. Same successful compilation result as in 3.7.0-insiders.20190902, linked above by @weswigham. |
@DanielRosenwasser Works for me now in |
Yes, 3.6.3-insiders.20190909 works for me too. |
Neither the 3.6.3 insiders nor the 3.7.0 insiders currently fix this issue for me in this repo - it however might be rbx typings, unsure about that, x-posting to rbx too. |
TypeScript Version: 3.6.2
Search Terms: excessive stack depth regression comparing types function lodash
Code
tsconfig.json
:package.json
:main.ts
:Expected behavior:
Compiles
Actual behavior:
This error doesn't give any helpful information for debugging.
Upgrading
@types/lodash
to the latest version (4.14.138 at time of writing) seems to fix the issue.If we disable
strictNullChecks
, we get a bit more information about the error (for some reason?):This did not error in TS 3.5, so I think it's a regression?
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: