@@ -278,17 +278,17 @@ declare module 'mongoose' {
278
278
279
279
namespace Schema {
280
280
namespace Types {
281
- class Array < B = any > extends SchemaType < B > implements AcceptsDiscriminator < B > {
281
+ class Array extends SchemaType implements AcceptsDiscriminator {
282
282
/** This schema type's name, to defend against minifiers that mangle function names. */
283
283
static schemaName : 'Array' ;
284
284
285
285
static options : { castNonArrays : boolean ; } ;
286
286
287
287
discriminator < T , U > ( name : string | number , schema : Schema < T , U > , value ?: string ) : U ;
288
- discriminator < D > ( name : string | number , schema : Schema < D > , value ?: string | number | ObjectId ) : Model < Omit < B , keyof D > & D > ;
288
+ discriminator < D > ( name : string | number , schema : Schema , value ?: string ) : Model < D > ;
289
289
290
290
/** The schematype embedded in this array */
291
- caster ?: SchemaType < B > ;
291
+ caster ?: SchemaType ;
292
292
293
293
/**
294
294
* Adds an enum validator if this is an array of strings or numbers. Equivalent to
@@ -338,17 +338,17 @@ declare module 'mongoose' {
338
338
static schemaName : 'Decimal128' ;
339
339
}
340
340
341
- class DocumentArray < B = any > extends SchemaType < B > implements AcceptsDiscriminator < B > {
341
+ class DocumentArray extends SchemaType implements AcceptsDiscriminator {
342
342
/** This schema type's name, to defend against minifiers that mangle function names. */
343
343
static schemaName : 'DocumentArray' ;
344
344
345
345
static options : { castNonArrays : boolean ; } ;
346
346
347
- discriminator < D > ( name : string | number , schema : Schema < D > , value ?: string | number | ObjectId ) : Model < Omit < B , keyof D > & D > ;
347
+ discriminator < D > ( name : string | number , schema : Schema , value ?: string ) : Model < D > ;
348
348
discriminator < T , U > ( name : string | number , schema : Schema < T , U > , value ?: string ) : U ;
349
349
350
350
/** The schema used for documents in this array */
351
- schema : Schema < B > ;
351
+ schema : Schema ;
352
352
353
353
/** The constructor used for subdocuments in this array */
354
354
caster ?: typeof Types . Subdocument ;
@@ -386,15 +386,15 @@ declare module 'mongoose' {
386
386
auto ( turnOn : boolean ) : this;
387
387
}
388
388
389
- class Subdocument < B = any > extends SchemaType < B > implements AcceptsDiscriminator < B > {
389
+ class Subdocument extends SchemaType implements AcceptsDiscriminator {
390
390
/** This schema type's name, to defend against minifiers that mangle function names. */
391
391
static schemaName : string ;
392
392
393
393
/** The document's schema */
394
- schema : Schema < B > ;
394
+ schema : Schema ;
395
395
396
396
discriminator < T , U > ( name : string | number , schema : Schema < T , U > , value ?: string ) : U ;
397
- discriminator < D > ( name : string | number , schema : Schema < D > , value ?: string | number | ObjectId ) : Model < Omit < B , keyof D > & D > ;
397
+ discriminator < D > ( name : string | number , schema : Schema , value ?: string ) : Model < D > ;
398
398
}
399
399
400
400
class String extends SchemaType {
0 commit comments