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

Method constructor

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

Source from the content-addressed store, hash-verified

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