Mongoose build error with latest TypeScript 'Type of property 'defaultProps' circularly references itself in mapped type' #9920
Labels
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
typescript
Types or Types-test related issue / Pull Request
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
I create
Document
forSchema
and I type some property as thatDocument
. Then I get a build error that type got a reference to itself. Same issue with some other libraries could be found here microsoft/TypeScript#37597If the current behavior is a bug, please provide the steps to reproduce.
This is
tsconfig.json
This is
package.json
fileIt is enough to run
npm run build
and to get an error in terminalWhat is the expected behavior?
Expected behavior is that build will pass without any errors.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js: 12.13.0
Mongoose: 5.11.11 (tried also with 5.11.15, same thing)
MongoDB: 3.6
The text was updated successfully, but these errors were encountered: