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?
Date in interface and schema are not compatible for Date. If the current behavior is a bug, please provide the steps to reproduce.
error:
Types of property 'type' are incompatible.
Type 'DateConstructor' is not assignable to type 'Date | typeof SchemaType | Schema<any, any, undefined, unknown> | undefined'.
Type 'DateConstructor' is missing the following properties from type 'typeof SchemaType': cast, checkRequired, set, get.
However if using field: {type: Date} as unknown as Date it works.
What is the expected behavior?
Should not raise the error What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose: 5.13.0
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?
Date in interface and schema are not compatible for Date.
If the current behavior is a bug, please provide the steps to reproduce.
error:
Types of property 'type' are incompatible.
Type 'DateConstructor' is not assignable to type 'Date | typeof SchemaType | Schema<any, any, undefined, unknown> | undefined'.
Type 'DateConstructor' is missing the following properties from type 'typeof SchemaType': cast, checkRequired, set, get.
However if using field: {type: Date} as unknown as Date it works.
What is the expected behavior?
Should not raise the error
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose: 5.13.0
The text was updated successfully, but these errors were encountered: