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: IntersectionType intersects more than 4 classes #871

Merged

Conversation

kpkonghk01
Copy link
Contributor

@kpkonghk01 kpkonghk01 commented Sep 29, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

Allow IntersectionType to accept any count of arguments, and join them together.

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

It doesn't accept more than 4 classes, blocked by the overloads.
And the return type of the original function is wrong, it only takes the first arg's type.

ScreenCap 2022-09-29 PM 5 19 16

Also has a closed issue for this: #860

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Fixing the problems in the discussion section of #341

Not sure if the helper types should be placed into a separate file since they only serve this function only

@kpkonghk01 kpkonghk01 force-pushed the fix/intersect-more-than-4-classes branch from c5a4bbd to e8d2f4a Compare September 30, 2022 03:12
@kamilmysliwiec
Copy link
Member

LGTM! Great PR

@kamilmysliwiec kamilmysliwiec merged commit a13c9a0 into nestjs:master Sep 30, 2022
@kpkonghk01 kpkonghk01 deleted the fix/intersect-more-than-4-classes branch June 20, 2023 08:30
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

Successfully merging this pull request may close these issues.

None yet

3 participants