Type alias HydratedDocument<DocType, TOverrides, TQueryHelpers>

HydratedDocument<DocType, TOverrides, TQueryHelpers>: IfAny<DocType, any, TOverrides extends Record<string, never>
    ? mongoose.Document<unknown, TQueryHelpers, DocType> & Require_id<DocType>
    : IfAny<TOverrides, mongoose.Document<unknown, TQueryHelpers, DocType> & Require_id<DocType>, mongoose.Document<unknown, TQueryHelpers, DocType> & MergeType<Require_id<DocType>, TOverrides>>>

Helper type for getting the hydrated document type from the raw document type. The hydrated document type is what new MyModel() returns.

Type Parameters

  • DocType

  • TOverrides = {}

  • TQueryHelpers = {}

Generated using TypeDoc