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

Method constructor

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

Source from the content-addressed store, hash-verified

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