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) adds types for mixin #6216

Merged
merged 2 commits into from
Jan 27, 2021
Merged

Conversation

dimitropoulos
Copy link
Contributor

@dimitropoulos dimitropoulos commented Jan 21, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[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?

mixin is hardcoded to any for its argument and its return.

Issue Number: N/A

What is the new behavior?

mixin returns the proper type

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

I couldn't get the project started correctly locally (this is my first contribution to nestjs I think):
Screenshot_20210121_125849

But I believe the second commit is correct in the changes it makes. I guess the CI will tell us.

@dimitropoulos dimitropoulos changed the title Mixin types fix(types) adds types for mixin Jan 21, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7a100b4b-dc5f-446c-9d2f-5b3522b484e1

  • 5 of 5 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.741%

Totals Coverage Status
Change from base Build ae7ac136-ac70-432e-a182-46db11fc9598: 0.0%
Covered Lines: 5080
Relevant Lines: 5362

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec added this to the 8.0.0 milestone Jan 27, 2021
@kamilmysliwiec kamilmysliwiec changed the base branch from master to 8.0.0 January 27, 2021 11:18
@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec merged commit fb14d96 into nestjs:8.0.0 Jan 27, 2021
This was referenced Jul 7, 2021
@brandon-leapyear
Copy link

brandon-leapyear commented Sep 23, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


This does break the case of generating a mixin

// works in version 7, not version 8
const mkFilter = (...args) => {
  class MyFilter {
    // implement class using args
  }

  return mixin(MyFilter)
}
TS4025: Exported variable 'mkFilter' has or is using private name 'MyFilter'.

Is this no longer supported, then? Or should it be filed as a bug?

@dimitropoulos dimitropoulos deleted the mixin-types branch September 24, 2021 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants