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

RequiredDeep silently erases types past a depth of 3 as a side-effect #677

Closed
ahrjarrett opened this issue Sep 2, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@ahrjarrett
Copy link
Contributor

ahrjarrett commented Sep 2, 2023

See this issue, specifically this comment.

Using a recursively mapped type like RequiredDeep comes with a side effect: even though VS Code seems to resolve the type, the type-checker ignores anything past a depth of 3.

Note that it's quite difficult to identify that type-checking is not happening at all, since there's still no indication by looking at the types that they don't actually check anything.

Users are almost certainly unaware that by using recursively mapped types like RequiredDeep, they are effectively turning off the type checker.

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
@ahrjarrett
Copy link
Contributor Author

https://tsplay.dev/wQbdvN

Tagging @ssalbdivad for visibility -- he's the one who thought to test this bug with RequiredDeep

@ahrjarrett
Copy link
Contributor Author

Looks like this will be fixed by microsoft/TypeScript#55638 🤞

@fregante fregante added the bug Something isn't working label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants