applyDelta(deltaBundle) {
      // Make sure that the first received delta is a fresh one.
      if (!this._initialized && !deltaBundle.reset) {
        throw new Error(
          'DeltaPatcher should receive a fresh Delta when being initialized',
        );
      }

      this._initialized = true;

      // Reset the current delta when we receive a fresh delta.
      if (deltaBundle.reset) {
        this._lastBundle = {
          pre: new Map(),
          post: new Map(),
          modules: new Map(),
        };
      }

      this._lastNumModifiedFiles =
        deltaBundle.pre.size + deltaBundle.post.size + deltaBundle.delta.size;

      if (this._lastNumModifiedFiles > 0) {
        this._lastModifiedDate = new Date();
      }

      this._patchMap(this._lastBundle.pre, deltaBundle.pre);
      this._patchMap(this._lastBundle.post, deltaBundle.post);
      this._patchMap(this._lastBundle.modules, deltaBundle.delta);

      return this;
    }
Applies a Delta Bundle to the current bundle.