MCPcopy Create free account
hub / github.com/TanStack/db / emit

Method emit

packages/db/src/collection/events.ts:138–143  ·  view source on GitHub ↗

* Emit an event to all listeners * Public API for emitting collection events

(
    event: T,
    eventPayload: AllCollectionEvents[T],
  )

Source from the content-addressed store, hash-verified

136 * Public API for emitting collection events
137 */
138 emit<T extends keyof AllCollectionEvents>(
139 event: T,
140 eventPayload: AllCollectionEvents[T],
141 ): void {
142 this.emitInner(event, eventPayload)
143 }
144
145 emitStatusChange<T extends CollectionStatus>(
146 status: T,

Callers 13

emitStatusChangeMethod · 0.95
emitSubscribersChangeMethod · 0.95
emitIndexAddedMethod · 0.95
emitIndexRemovedMethod · 0.95
persisted.test.tsFile · 0.80
trackLoadPromiseMethod · 0.80
mutationFnFunction · 0.80
collection.test.tsFile · 0.80
mutationFnFunction · 0.80

Calls 1

emitInnerMethod · 0.80

Tested by 2

mutationFnFunction · 0.64
mutationFnFunction · 0.64