MCPcopy Create free account
hub / github.com/TanStack/query / constructor

Method constructor

packages/query-core/src/queriesObserver.ts:78–92  ·  view source on GitHub ↗
(
    client: QueryClient,
    queries: Array<QueryObserverOptions<any, any, any, any, any>>,
    options?: QueriesObserverOptions<TCombinedResult>,
  )

Source from the content-addressed store, hash-verified

76 #observerMatches: Array<QueryObserverMatch> = []
77
78 constructor(
79 client: QueryClient,
80 queries: Array<QueryObserverOptions<any, any, any, any, any>>,
81 options?: QueriesObserverOptions<TCombinedResult>,
82 ) {
83 super()
84
85 this.#client = client
86 this.#options = options
87 this.#queries = []
88 this.#observers = []
89 this.#result = []
90
91 this.setQueries(queries)
92 }
93
94 protected override onSubscribe(): void {
95 if (this.listeners.size === 1) {

Callers

nothing calls this directly

Calls 1

setQueriesMethod · 0.95

Tested by

no test coverage detected