_assert (entity) {
      if (!entity) throw new MissingRequiredArgumentError({ message: `${this._type.name} required` })
      if (!(entity instanceof this._type)) {
        throw new IllegalArgumentError({
          message: `type ${this._type.name} required`,
          info: { given: entity }
        })
      }
    }
// subclasses should set to class of entity being persisted, like: this._type = Customer
subclasses should set to class of entity being persisted, like: this._type = Customer
subclasses should set to class of entity being persisted like : this . _type = Customer
_assert (entity) {
      if (!entity) throw new MissingRequiredArgumentError({ message: `${this._type.name} required` })
      if (!(entity instanceof this._type)) {
        throw new IllegalArgumentError({
          message: `type ${this._type.name} required`,
          info: { given: entity }
        })
      }
    }
_assert ( entity ) { if ( ! entity ) throw new MissingRequiredArgumentError ( { message : ` ${ this . _type . name } ` } ) if ( ! ( entity instanceof this . _type ) ) { throw new IllegalArgumentError ( { message : ` ${ this . _type . name } ` , info : { given : entity } } ) } }
subclasses should set to class of entity being persisted, like: this._type = Customer
subclasses should set to class of entity being persisted like : this . _type = Customer