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

Method currentStateAsChanges

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

* Returns the current state of the collection as an array of changes * @param options - Options including optional where filter * @returns An array of changes * @example * // Get all items as changes * const allChanges = collection.currentStateAsChanges() * * // Get only items m

(
    options: CurrentStateAsChangesOptions = {},
  )

Source from the content-addressed store, hash-verified

886 * })
887 */
888 public currentStateAsChanges(
889 options: CurrentStateAsChangesOptions = {},
890 ): Array<ChangeMessage<WithVirtualProps<TOutput, TKey>>> | void {
891 return currentStateAsChanges(this, options)
892 }
893
894 /**
895 * Subscribe to changes in the collection

Calls 1

currentStateAsChangesFunction · 0.90

Tested by

no test coverage detected