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: add type for checkSchema function return #1072

Conversation

nikli2009
Copy link
Contributor

@nikli2009 nikli2009 commented Jul 31, 2021

Background

image
When getting a list of result by calling checkSchema().run, I was unable to use those handy methods on result as it was marked as unknown currently.
Would be def great if we could add type support for the return of checkSchema, thanks.

Description

Type definition for checkSchema function return.

To-do list

  • I have added tests for what I changed.

  • This pull request is ready to merge.

@coveralls
Copy link

coveralls commented Jul 31, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling e8463c7 on nikli2009:docs/checkschema-return-type-enhancement into 690cd63 on express-validator:master.

@fedeci fedeci changed the title docs: add type for checkSchema function return fix: add type for checkSchema function return Jul 31, 2021
@fedeci fedeci requested a review from gustavohenke July 31, 2021 09:25
Copy link
Member

@fedeci fedeci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!🚀

src/middlewares/schema.ts Outdated Show resolved Hide resolved
src/middlewares/schema.ts Outdated Show resolved Hide resolved
@fedeci
Copy link
Member

fedeci commented Sep 26, 2021

Thanks again!

@fedeci fedeci merged commit 5373dd7 into express-validator:master Sep 26, 2021
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

3 participants