mongoose-update-if-current
mongoose-update-if-current copied to clipboard
Fixed issue #386 added generic to function type declaration of update…
Fixed issue #386
Description
in the file ./typings/index.d.ts I added generic parameter to function type declaration of updateIfCurrentPlugin as well as its first parameter schema.
Related Issue
issue #386
Motivation and Context
Typescript and mongoose require generics to be defined, or else it throws and error. Fixed issue #386 added generic to function type declaration of update
How Has This Been Tested?
replicated issue using typescript environment, as two other commenters have noted. Error no longer occurs. Only the index.d.ts file was updated, so there should be no change overall implementation.
Types of changes
- [ x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [ x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x ] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [ x] All new and existing tests passed.