You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Creating a schema with an array of ObjectId and defining a corresponding TypeScript interface causes a compiler error, stating that the types are incompatible.
A single ObjectId (no array) works fine though. Arrays of other types also work fine. It just seems to be array of ObjectId which is problematic.
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Before upgrading to mongoose v6 I was able to create a schema with an array of ObjectId and use a corresponding TypeScript interface.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
node: v16.3.0
mongoose: 6.0.1
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Creating a schema with an array of ObjectId and defining a corresponding TypeScript interface causes a compiler error, stating that the types are incompatible.
A single ObjectId (no array) works fine though. Arrays of other types also work fine. It just seems to be array of ObjectId which is problematic.
If the current behavior is a bug, please provide the steps to reproduce.
tsconfig.json
What is the expected behavior?
Before upgrading to mongoose v6 I was able to create a schema with an array of ObjectId and use a corresponding TypeScript interface.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
node: v16.3.0
mongoose: 6.0.1
The text was updated successfully, but these errors were encountered: