@internal
(query: Query<any, any, any, any>)
| 179 | |
| 180 | /** @internal */ |
| 181 | add(query: Query<any, any, any, any>): void { |
| 182 | if (!this.#queries.has(query.queryHash)) { |
| 183 | this.#queries.set(query.queryHash, query) |
| 184 | |
| 185 | this.notify({ |
| 186 | type: 'added', |
| 187 | query, |
| 188 | }) |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Destroys the given `Query` and removes it from the cache, notifying subscribers with a |