Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "schema"

Index

Type aliases

LazyClass

LazyClass: () => Constructor

Type declaration

SchemaType

SchemaType<T>: Omit<SchemaTypeOpts<T>, "type"> & { type?: T }

Type parameters

  • T

Functions

array

  • array<T>(type?: T, options?: SchemaTypeOpts<T[]>): (Anonymous function)
  • Type parameters

    • T: unknown

    Parameters

    • Optional type: T
    • Optional options: SchemaTypeOpts<T[]>

    Returns (Anonymous function)

defaults

  • defaults<T>(value: T): PropertyDecorator
  • Type parameters

    • T

    Parameters

    • value: T

    Returns PropertyDecorator

enums

  • enums(values: Array<string | number> | Record<string | number, string | number>): PropertyDecorator
  • Parameters

    • values: Array<string | number> | Record<string | number, string | number>

    Returns PropertyDecorator

hidden

  • hidden(): PropertyDecorator

id

  • id(): PropertyDecorator

indexed

  • indexed(): PropertyDecorator

methods

  • methods(): PropertyDecorator

mongoId

  • mongoId<T>(options?: SchemaTypeOpts<T> & { type?: T }, type?: T): PropertyDecorator
  • Type parameters

    • T

    Parameters

    • Default value options: SchemaTypeOpts<T> & { type?: T } = {}
    • Optional type: T

    Returns PropertyDecorator

prop

  • prop<T>(options?: SchemaType<T>, type?: SchemaDefinition["type"]): PropertyDecorator
  • Type parameters

    • T

    Parameters

    • Default value options: SchemaType<T> = {}
    • Optional type: SchemaDefinition["type"]

    Returns PropertyDecorator

query

  • query(): PropertyDecorator

ref

  • ref(nameOrClass: string | LazyClass, idType: unknown): any
  • ref(nameOrClass: IMongooseClass, idType?: unknown): any

refArray

required

  • required(): PropertyDecorator

statics

  • statics(): PropertyDecorator

type

unique

  • unique(): PropertyDecorator

virtual

  • virtual(): MethodDecorator

Generated using TypeDoc