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

Method addSignalProperty

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected