Class Passthrough

Use this class if raw mongoose for a path is wanted It is still recommended to use the typegoose classes directly

See

Using Passthrough, the paths created will also result as an Schema (since mongoose 6.0), see Mongoose#7181

Example

class Dummy {
@prop({ type: () => new Passthrough({ somePath: String }) })
public somepath: { somePath: string };
}

class Dummy {
@prop({ type: () => new Passthrough({ somePath: String }, true) })
public somepath: { somePath: string };
}

Hierarchy

  • Passthrough

Constructors

Properties

Constructors

  • Use this like new mongoose.Schema()

    Parameters

    • raw: any

      The Schema definition

    • Optional direct: boolean

      Directly insert "raw", instead of using "type" (this will not apply any other inner options)

      Optional

    Returns Passthrough

Properties

direct: boolean
raw: any

Generated using TypeDoc