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

Method constructor

packages/query-core/src/queryObserver.ts:87–104  ·  view source on GitHub ↗
(
    client: QueryClient,
    public options: QueryObserverOptions<
      TQueryFnData,
      TError,
      TData,
      TQueryData,
      TQueryKey
    >,
  )

Source from the content-addressed store, hash-verified

85 #trackedProps = new Set<keyof QueryObserverResult>()
86
87 constructor(
88 client: QueryClient,
89 public options: QueryObserverOptions<
90 TQueryFnData,
91 TError,
92 TData,
93 TQueryData,
94 TQueryKey
95 >,
96 ) {
97 super()
98
99 this.#client = client
100 this.#selectError = null
101
102 this.bindMethods()
103 this.setOptions(options)
104 }
105
106 protected bindMethods(): void {
107 this.refetch = this.refetch.bind(this)

Callers

nothing calls this directly

Calls 2

bindMethodsMethod · 0.95
setOptionsMethod · 0.95

Tested by

no test coverage detected