MCPcopy
hub / github.com/TanStack/query / constructor

Method constructor

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

Source from the content-addressed store, hash-verified

70 #trackedProps = new Set<keyof QueryObserverResult>()
71
72 constructor(
73 client: QueryClient,
74 public options: QueryObserverOptions<
75 TQueryFnData,
76 TError,
77 TData,
78 TQueryData,
79 TQueryKey
80 >,
81 ) {
82 super()
83
84 this.#client = client
85 this.#selectError = null
86 this.#currentThenable = pendingThenable()
87
88 this.bindMethods()
89 this.setOptions(options)
90 }
91
92 protected bindMethods(): void {
93 this.refetch = this.refetch.bind(this)

Callers

nothing calls this directly

Calls 3

bindMethodsMethod · 0.95
setOptionsMethod · 0.95
pendingThenableFunction · 0.90

Tested by

no test coverage detected