-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
typescriptTypes or Types-test related issue / Pull RequestTypes or Types-test related issue / Pull Request
Milestone
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Currently, Object.create() doesn't provide type completion except for the _id field.
Previously Document was set a class Document, now it is class Document<T = any>
The change happened in this commit
Line 369 in aef25e0
| class Document<T = any> { |
Last working version I tried this was with 5.11.7
If the current behavior is a bug, please provide the steps to reproduce.
Install 5.11.16, try to use schema.create(), types will be missing.
{
"compilerOptions": {
"allowJs": false,
"module": "commonjs",
"esModuleInterop": true,
"target": "es5",
"noImplicitAny": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"baseUrl": ".",
"paths": {
"@typeDefs/*": [
"../shared/*"
],
}
},
"include": [
"src/**/*"
],
"references": [
{
"path": "../shared"
}
]
}
What is the expected behavior?
Editor provides types
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node v15.8.0, Mongoose 5.11.16, no database registered.
LukasGerm
Metadata
Metadata
Assignees
Labels
typescriptTypes or Types-test related issue / Pull RequestTypes or Types-test related issue / Pull Request