SchemaType()

Parameters

SchemaType constructor. Do not instantiate SchemaType directly. Mongoose converts your schema paths into SchemaTypes automatically.

Example:

  1. const schema = new Schema({ name: String });
  2. schema.path('name') instanceof SchemaType; // true