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
Type '{ type: typeof Schema.Types.ObjectId; required: true; }' is not assignable to type 'typeof SchemaType | Function[] | SchemaTypeOptions<ObjectId> | Schema<Document<any, {}>, Model<any, any>, undefined> | Schema<...>[] | SchemaTypeOptions<...>[] | { ...; } | { ...; }[]'.
Types of property 'type' are incompatible.
Type 'typeof ObjectId' is missing the following properties from type 'ObjectId': auto, default, immutable, index, and 8 more.ts(2322)
field approved
Type '{ type: typeof Schema.Types.Boolean; required: true; }' is not assignable to type 'boolean | typeof SchemaType | Function[] | SchemaTypeOptions<false> | Schema<Document<any, {}>, Model<any, any>, undefined> | ... 7 more ... | true[]'.
Types of property 'type' are incompatible.
Type 'typeof Boolean' is not assignable to type 'boolean'.ts(2322)
field createdBy
Type '{ type: Schema<Document<any, {}>, Model<any, any>, undefined>; required: true; }' is not assignable to type '{ id?: "string" | StringConstructor | "String" | typeof String | SchemaTypeOptions<string>; name?: "string" | StringConstructor | "String" | typeof String | SchemaTypeOptions<...>; } | ... 6 more ... | { ...; }[]'.
Types of property 'type' are incompatible.
Type 'Schema<Document<any, {}>, Model<any, any>, undefined>' is missing the following properties from type 'IUser': id, namets(2322)
field createdAt
Type '{ type: typeof Schema.Types.Date; required: true; }' is not assignable to type 'typeof SchemaType | Function[] | SchemaTypeOptions<Date> | Schema<Document<any, {}>, Model<any, any>, undefined> | Schema<...>[] | SchemaTypeOptions<...>[] | { ...; } | { ...; }[]'.
Types of property 'type' are incompatible.
Type 'typeof Date' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 38 more.ts(2322)
The text was updated successfully, but these errors were encountered:
node version: v14.15.1
typescript version: v4.2.3
mongoose version: v5.12.0
codes
error details
The text was updated successfully, but these errors were encountered: