Skip to content
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

Type instantiation is excessively deep in ReadonlyDeep #467

Closed
marekdedic opened this issue Sep 17, 2022 · 3 comments
Closed

Type instantiation is excessively deep in ReadonlyDeep #467

marekdedic opened this issue Sep 17, 2022 · 3 comments

Comments

@marekdedic
Copy link

marekdedic commented Sep 17, 2022

Hi,
I recently updated my declaration of ReadonlyDeep to use the new call signature handling from #359, however, I get error TS2589: Type instantiation is excessively deep and possibly infinite. :(

See the repro in the playground for details.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@skarab42
Copy link
Collaborator

@marekdedic I'm not sure why you want to make the jQuery object read-only (and deep). It's a huge object with lots of references to HTML objects and as the update includes index signatures all these objects will be made read-only deep which makes TS reach its memory limit very quickly.

@marekdedic
Copy link
Author

Hi, for the same reason you'd make anything read-only I think 😀 To have stricter control over what gets modified...

I agree that the jQuery object is huge, that's why it crashes...

@fregante
Copy link
Collaborator

I don’t think it's practical/possible because it would ask to make all the nested DOM types readonly too, not just jQuery methods

@fregante fregante closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants