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

Method constructor

packages/query-core/src/mutationObserver.ts:43–58  ·  view source on GitHub ↗
(
    client: QueryClient,
    options: MutationObserverOptions<
      TData,
      TError,
      TVariables,
      TOnMutateResult
    >,
  )

Source from the content-addressed store, hash-verified

41 #mutateOptions?: MutateOptions<TData, TError, TVariables, TOnMutateResult>
42
43 constructor(
44 client: QueryClient,
45 options: MutationObserverOptions<
46 TData,
47 TError,
48 TVariables,
49 TOnMutateResult
50 >,
51 ) {
52 super()
53
54 this.#client = client
55 this.setOptions(options)
56 this.bindMethods()
57 this.#updateResult()
58 }
59
60 protected bindMethods(): void {
61 this.mutate = this.mutate.bind(this)

Callers

nothing calls this directly

Calls 3

setOptionsMethod · 0.95
bindMethodsMethod · 0.95
#updateResultMethod · 0.95

Tested by

no test coverage detected