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

Method constructor

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

Source from the content-addressed store, hash-verified

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