type-fest
type-fest copied to clipboard
`RequiredDeep` silently erases types past a depth of 3 as a side-effect
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.
https://tsplay.dev/wQbdvN
Tagging @ssalbdivad for visibility -- he's the one who thought to test this bug with RequiredDeep
Looks like this will be fixed by https://github.com/microsoft/TypeScript/pull/55638 🤞