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

Method addSignalProperty

packages/query-core/src/query.ts:758–769  ·  view source on GitHub ↗
(object: object)

Source from the content-addressed store, hash-verified

756 // which sets abortSignalConsumed to true when the signal
757 // is read.
758 const addSignalProperty = (object: object) => {
759 Object.defineProperties(object, {
760 [fetchSignal]: { value: abortController.signal, enumerable: true },
761 signal: {
762 enumerable: true,
763 get: () => {
764 this.#abortSignalConsumed = true
765 return abortController.signal
766 },
767 },
768 })
769 }
770
771 // Create fetch function
772 const fetchFn = () => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected