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

Method addSignalProperty

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected