MCPcopy Index your code
hub / github.com/Automattic/mongoose / DocumentArray

Class DocumentArray

types/schematypes.d.ts:504–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502 }
503
504 class DocumentArray extends SchemaType implements AcceptsDiscriminator {
505 /** This schema type's name, to defend against minifiers that mangle function names. */
506 static schemaName: 'DocumentArray';
507 readonly schemaName: 'DocumentArray';
508
509 static options: { castNonArrays: boolean };
510
511 schemaOptions?: SchemaOptions;
512
513 discriminator<D>(name: string | number, schema: Schema, value?: string): Model<D>;
514 discriminator<T, U>(name: string | number, schema: Schema<T, U>, value?: string): U;
515
516 /** The schema used for documents in this array */
517 schema: Schema;
518
519 /** The schematype embedded in this array */
520 embeddedSchemaType: Subdocument;
521
522 /** The constructor used for subdocuments in this array */
523 Constructor: typeof Types.Subdocument;
524
525 /** Default options for this SchemaType */
526 static defaultOptions: Record<string, any>;
527 }
528
529 class DocumentArrayElement extends SchemaType {
530 /** This schema type's name, to defend against minifiers that mangle function names. */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…