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

Method setDeps

packages/db/src/collection/state.ts:142–154  ·  view source on GitHub ↗
(deps: {
    collection: CollectionImpl<TOutput, TKey, any, TSchema, TInput>
    lifecycle: CollectionLifecycleManager<TOutput, TKey, TSchema, TInput>
    changes: CollectionChangesManager<TOutput, TKey, TSchema, TInput>
    indexes: CollectionIndexesManager<TOutput, TKey, TSchema, TInput>
    events: CollectionEventsManager
  })

Source from the content-addressed store, hash-verified

140 }
141
142 setDeps(deps: {
143 collection: CollectionImpl<TOutput, TKey, any, TSchema, TInput>
144 lifecycle: CollectionLifecycleManager<TOutput, TKey, TSchema, TInput>
145 changes: CollectionChangesManager<TOutput, TKey, TSchema, TInput>
146 indexes: CollectionIndexesManager<TOutput, TKey, TSchema, TInput>
147 events: CollectionEventsManager
148 }) {
149 this.collection = deps.collection
150 this.lifecycle = deps.lifecycle
151 this.changes = deps.changes
152 this.indexes = deps.indexes
153 this._events = deps.events
154 }
155
156 /**
157 * Checks if a row has pending optimistic mutations (not yet confirmed by sync).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected