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(common): right generic type arg constraint for FileValidator#isValid method #12031

Merged
merged 1 commit into from Jul 17, 2023

Conversation

micalevisk
Copy link
Member

@micalevisk micalevisk commented Jul 16, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

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

Issue Number: closes #12019

What is the new behavior?

the only way to proper narrowing the type of the first arg of FileValidator#isValid method AFIAK is via class generic type arg instead of the method-based one which was introduced in PR #11040

image

image

image

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@micalevisk micalevisk changed the title fix(common): generic type constraint for FileValidator#isValid method fix(common): right generic type arg constraint for FileValidator#isValid method Jul 16, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 67d4d269-d732-4120-b08b-47d79aa8e1e4

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

Totals Coverage Status
Change from base Build 3dfb6545-1975-4a99-b2ed-aaa49f412a91: 0.0%
Covered Lines: 6364
Relevant Lines: 6853

💛 - Coveralls

@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec merged commit c79f8d6 into nestjs:master Jul 17, 2023
5 checks passed
@micalevisk micalevisk deleted the fix/issue-12019 branch July 17, 2023 10:24
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.

FileValidator TS Error: Type 'TFile | undefined' is not assignable to type 'File'.
3 participants