-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Plans on releasing a TypeScript type? #6
Comments
Definitely something worth introducing. Thanks for the suggestion. |
I released a new version of this plugin v1.1.0 that adds types. Please try it out and let me know if it works for your use case. Cheers! |
Hi, I do have some problems here, I put them here, let me know if you think this is the type definition or my implementation. 1- I used 2- I tried to import the plugin in my root mongoose file and apply this to the mongoose global object, like this:
and It gives me this warning:
Note that even when I add the plugin directly to my schemas, It gives me the same warning. Do you experience the same errors or does it looks like it is on my side? |
I resolved typing issue with this import softDelete from 'mongoose-softdelete';
// ...
userSchema.plugin(softDelete as () => Schema<any>); Also maybe it is simplier to make a PR on https://github.com/DefinitelyTyped/DefinitelyTyped ? |
@madeindjs PRs are always welcomed 😃 |
@riyadhalnur , I made a simple PR 😉 |
Hi, everything is in the question:
Are there any plans on doing a TypeScript definition? Would be amazing to have the autocompletion features and validation.
Thanks for any information :)
Tom
The text was updated successfully, but these errors were encountered: