[TypeScript] TS error when declaring array path with { type: [{ type: String }] }
#10731
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Do you want to request a feature or report a bug?
Report a bug.
What is the current behavior?
Currently, declaring an array path with
{ type: [{ type: String }] }
causes a TS error.If the current behavior is a bug, please provide the steps to reproduce.
TS error:
tsconfig.json
:What is the expected behavior?
No TypeScript error.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js: v14.17.3
Mongoose: v6.0.6
TypeScript: v4.4.3
MongoDB: irrelevant
The text was updated successfully, but these errors were encountered: