mongoose
mongoose copied to clipboard
Align MongooseModuleOptions with MongooseModuleAsyncOptions
I'm submitting a...
[ ] Regression
[ ] Bug report
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
Expected behavior
We should refactor the forRoot method to not have the first param uri
. And make the URI non-optional in the MongooseModuleOptions. Then we could safe this if
statement. This would also have the advantage that the forRoot
method and the MongooseModuleAsyncOptions
have the same params. Which feels better for me.
Minimal reproduction of the problem with instructions
None.
What is the motivation / use case for changing the behavior?
Better alignment of params. This would introduce breaking changes.
Environment
Nest version: 6.X
For Tooling issues:
- Node version: XX
- Platform:
Others: