-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Types] How to set the model type of discriminator? #10421
Comments
|
Do you mean the interface must extend mongoose.Document? But mongoose official document (link) recommends not extend: Therefore, i changed all interfaces back into not extend. It took me several days. Which one should i follow? |
@lutherman you're correct, we recommend that your document interface doesn't |
@vkarpov15 It’s fine. Thank you for following up. |
Hi,
I tried to set Model type for discriminator, but got the type error.
Codes:
And the error message:
If my syntax is not correct, would you mind telling me the correct answer?
nodejs: 12.19.0
mongodb: 4.2.7
mongoose: 5.13.2
The text was updated successfully, but these errors were encountered: