-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Document<T = any> in index.d.ts breaks schema.create() #9928
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Comments
The last version which works for me is 5.11.9. The version 5.11.10 or later is not working anymore. |
This was referenced Mar 5, 2021
Closed
This was referenced Mar 12, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Currently, Object.create() doesn't provide type completion except for the _id field.
Previously Document was set a
class Document
, now it isclass Document<T = any>
The change happened in this commit
mongoose/index.d.ts
Line 369 in aef25e0
Last working version I tried this was with 5.11.7
If the current behavior is a bug, please provide the steps to reproduce.
Install 5.11.16, try to use
schema.create()
, types will be missing.What is the expected behavior?
Editor provides types
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node v15.8.0, Mongoose 5.11.16, no database registered.
The text was updated successfully, but these errors were encountered: