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

Method addSignalProperty

packages/query-core/src/query.ts:449–457  ·  view source on GitHub ↗
(object: unknown)

Source from the content-addressed store, hash-verified

447 // which sets abortSignalConsumed to true when the signal
448 // is read.
449 const addSignalProperty = (object: unknown) => {
450 Object.defineProperty(object, 'signal', {
451 enumerable: true,
452 get: () => {
453 this.#abortSignalConsumed = true
454 return abortController.signal
455 },
456 })
457 }
458
459 // Create fetch function
460 const fetchFn = () => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected