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: improve DeepPartial recursion #8732

Merged
merged 6 commits into from Mar 26, 2022
Merged

fix: improve DeepPartial recursion #8732

merged 6 commits into from Mar 26, 2022

Conversation

pbrn46
Copy link
Contributor

@pbrn46 pbrn46 commented Mar 8, 2022

Description of change

Similar to the original pull request of #8187, but instead of narrowing primitives first, it checks for the known recursivable (real word?) types first. Otherwise, it will return the original type. It will solve the Date | string problem of that pull request.

This also merges the previous simplification made in b93416d to allow for generics.

Fixes #2904
Fixes #8681

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change - N/A
  • The new commits follow conventions explained in CONTRIBUTING.md

@pleerock pleerock merged commit 0494008 into typeorm:master Mar 26, 2022
@pleerock
Copy link
Member

Thank you for contribution! 🎉

@pbrn46 pbrn46 deleted the deeppartial branch March 26, 2022 16:33
M-TGH pushed a commit to TradeCast/typeorm that referenced this pull request Mar 29, 2022
* fix: improve DeepPartial recursion

Closes: typeorm#8681

* type simplification

* merging master

* format

* format

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants