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

fix(types): fix TS 4.9 excessive depth error on InferAttributes (v7) #15134

Merged
merged 4 commits into from Oct 15, 2022

Conversation

ephys
Copy link
Member

@ephys ephys commented Oct 15, 2022

Pull Request Checklist

  • Have you added new tests to prevent regressions?
  • If a documentation update is necessary, have you opened a PR to the documentation repository?
  • Did you update the typescript typings accordingly (if applicable)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Does the name of your PR follow our conventions?

Description Of Change

#15133: The latest TS build errors on InferAttributes with a Type instantiation is excessively deep and possibly infinite. error. Thankfully the fix is easy: Exclude keys inherited from Model before checking its values to reduce the type depth. Should improve perfs too.

No new test needed, but this wasn't caught by our CI yet. Will be once we add TypeScript 4.9

This should also get us ready for TS 4.9, I fixed all new typing issues

@ephys ephys self-assigned this Oct 15, 2022
@ephys ephys added the type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. label Oct 15, 2022
@ephys
Copy link
Member Author

ephys commented Oct 15, 2022

it works on 4.9 so of course it fails on all other versions 😄

@ephys ephys marked this pull request as draft October 15, 2022 18:43
@ephys ephys marked this pull request as ready for review October 15, 2022 19:16
@WikiRik WikiRik merged commit 5ac3c48 into main Oct 15, 2022
@WikiRik WikiRik deleted the ephys/fix-ts-4.9 branch October 15, 2022 19:30
@github-actions
Copy link
Contributor

🎉 This PR is included in version 7.0.0-alpha.19 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @v7 type: bug type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants