fix: add schema type

This commit is contained in:
Arash
2023-10-11 20:12:17 -06:00
parent b0fb2edc24
commit 4bc07425b4

View File

@ -22,11 +22,11 @@ export async function defineMongooseConnection({ uri, options }: { uri?: string;
export function defineMongooseModel<T>(
nameOrOptions: string | {
name: string
schema: SchemaDefinition
schema: SchemaDefinition<T>
options?: SchemaOptions
hooks?: (schema: mongoose.Schema<T>) => void
},
schema?: SchemaDefinition,
schema?: SchemaDefinition<T>,
options?: SchemaOptions,
hooks?: (schema: mongoose.Schema<T>) => void,
): Model<T> {