Types of props inside schema consutructor not working
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
After updating to the last version and removed @types/mongoose
to depend on current version types when i create a schema types not autocomplete like the picture below, when i reviewd generic types of schema i found out that, the third generic type which is SchemaDefinitionType
= undefined by default!
What is the expected behavior?
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that “latest” is not a version.
"typescript": "^4.1.5",
"mongodb": "^3.6.4",
"mongoose": "^5.11.16",
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
prop({default: {}}) does not work correctly for nested documents
typegoose/typegoose": "^6.1.2" When working with documents of strong structure, properties pointing to the default sub-document do not work ...
Read more >React How to fix Failed prop type - Invalid prop of type string ...
Try console. log of "errors" in the component where Login component is rendered to see what value is getting set.
Read more >Error & Warning Details - typegoose
Typegoose uses the property OptionsConstructor on types (like mongoose.Schema.Types.ObjectId.OptionsConstructor ) to correctly map the options (from @prop( ...
Read more >Working with nullable reference types - EF Core
Working with C# nullable reference types when using Entity Framework Core.
Read more >React Props - W3Schools
React Props are like function arguments in JavaScript and attributes in HTML. ... If you have a variable to send, and not a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ShadiestGoat
I tried to pass the interface as a third parameter and it works now, thanks
@ahmednaser94
Most certainly is for me