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
Currently, if I have a model that needs to be validated on the creation I'll try to overload the creation function. The problem is that this leads to the following error
Class static side 'typeof User' incorrectly extends base class static side '{ readonly $fieldsDefinitions: Map<string, FieldOptions>; $addField(name: string, options?: Partial<FieldOptions> | undefined): FieldOptions; ... 16 more ...; getCollection<ModelType extends MongodbModel<...>>(this: ModelType, connection?: string | undefined): Promise<...>; }'.
The types returned by 'create(...)' are incompatible between these types.
Type 'Promise<MongodbDocument<unknown>>' is not assignable to type 'Promise<InstanceType<ModelType>>'.
Type 'MongodbDocument<unknown>' is not assignable to type 'InstanceType<ModelType>'.
The text was updated successfully, but these errors were encountered:
Currently, if I have a model that needs to be validated on the creation I'll try to overload the creation function. The problem is that this leads to the following error
The text was updated successfully, but these errors were encountered: