docs: function (f) {
      var self = this;
  
      if (typeof f !== 'function')
        throw new Error("onInvalidate requires a function");
  
      if (self.invalidated) {
        Deps.nonreactive(function () {
          callWithNoYieldsAllowed(f, self);
        });
      } else {
        self._onInvalidateCallbacks.push(f);
      }
    }