fix: add schema type
This commit is contained in:
@ -22,11 +22,11 @@ export async function defineMongooseConnection({ uri, options }: { uri?: string;
|
|||||||
export function defineMongooseModel<T>(
|
export function defineMongooseModel<T>(
|
||||||
nameOrOptions: string | {
|
nameOrOptions: string | {
|
||||||
name: string
|
name: string
|
||||||
schema: SchemaDefinition
|
schema: SchemaDefinition<T>
|
||||||
options?: SchemaOptions
|
options?: SchemaOptions
|
||||||
hooks?: (schema: mongoose.Schema<T>) => void
|
hooks?: (schema: mongoose.Schema<T>) => void
|
||||||
},
|
},
|
||||||
schema?: SchemaDefinition,
|
schema?: SchemaDefinition<T>,
|
||||||
options?: SchemaOptions,
|
options?: SchemaOptions,
|
||||||
hooks?: (schema: mongoose.Schema<T>) => void,
|
hooks?: (schema: mongoose.Schema<T>) => void,
|
||||||
): Model<T> {
|
): Model<T> {
|
||||||
|
|||||||
Reference in New Issue
Block a user