autoSave(interval) {
      if (!interval) {
        this.stateManager.disableAutoSave();
      } else {
        this.stateManager.enableAutoSave(interval);
      }
    }
Registers a plugin for the model.
@param {string} name - Name of the plugin.
@param {Function} plugin - Plugin class or constructor function.
@param options
@throws {Error} If a plugin with the same name is already registered.