removeFilter(name, fn) {
    if (this._filters[name]) {
      // @ts-expect-error
      this._filters[name] = this._filters[name].filter(filter => filter.fn !== fn);
    }

    if (this.pswp) {
      this.pswp.removeFilter(name, fn);
    }
  }
@template {keyof PhotoSwipeFiltersMap} T
@param {T} name
@param {PhotoSwipeFiltersMap[T]} fn