@@ -175,7 +175,6 @@ declare module 'mongoose' {
175
175
*/
176
176
readonly models : Readonly < { [ index : string ] : Model < any > } > ;
177
177
178
- /** Defines or retrieves a model. */
179
178
model < TSchema extends Schema = any > (
180
179
name : string ,
181
180
schema ?: TSchema ,
@@ -185,20 +184,24 @@ declare module 'mongoose' {
185
184
InferSchemaType < TSchema > ,
186
185
ObtainSchemaGeneric < TSchema , 'TQueryHelpers' > ,
187
186
ObtainSchemaGeneric < TSchema , 'TInstanceMethods' > ,
188
- { } ,
187
+ ObtainSchemaGeneric < TSchema , 'TVirtuals' > ,
189
188
HydratedDocument <
190
189
InferSchemaType < TSchema > ,
191
- ObtainSchemaGeneric < TSchema , 'TInstanceMethods' > ,
192
- ObtainSchemaGeneric < TSchema , 'TQueryHelpers' >
190
+ ObtainSchemaGeneric < TSchema , 'TVirtuals' > & ObtainSchemaGeneric < TSchema , 'TInstanceMethods' > ,
191
+ ObtainSchemaGeneric < TSchema , 'TQueryHelpers' > ,
192
+ ObtainSchemaGeneric < TSchema , 'TVirtuals' >
193
193
> ,
194
- TSchema > & ObtainSchemaGeneric < TSchema , 'TStaticMethods' > ;
194
+ TSchema
195
+ > & ObtainSchemaGeneric < TSchema , 'TStaticMethods' > ;
196
+
197
+ model < T > ( name : string , schema ?: Schema < any , T , any , any > , collection ?: string , options ?: CompileModelOptions ) : Model < T > ;
198
+
195
199
model < T , U , TQueryHelpers = { } > (
196
200
name : string ,
197
- schema ?: Schema < any , T , any , any , TQueryHelpers , any , any , any > ,
201
+ schema ?: Schema < any , T , U , any , TQueryHelpers , any , any , any > ,
198
202
collection ?: string ,
199
203
options ?: CompileModelOptions
200
204
) : U ;
201
- model < T > ( name : string , schema ?: Schema < any , T , any , any > , collection ?: string , options ?: CompileModelOptions ) : Model < T > ;
202
205
203
206
/** Returns an array of model names created on this connection. */
204
207
modelNames ( ) : Array < string > ;
0 commit comments