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

Method once

packages/db/src/collection/index.ts:958–963  ·  view source on GitHub ↗

* Subscribe to a collection event once

(
    event: T,
    callback: CollectionEventHandler<T>,
  )

Source from the content-addressed store, hash-verified

956 * Subscribe to a collection event once
957 */
958 public once<T extends keyof AllCollectionEvents>(
959 event: T,
960 callback: CollectionEventHandler<T>,
961 ) {
962 return this._events.once(event, callback)
963 }
964
965 /**
966 * Unsubscribe from a collection event

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected