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

Method setDeps

packages/db/src/collection/changes.ts:38–50  ·  view source on GitHub ↗
(deps: {
    lifecycle: CollectionLifecycleManager<TOutput, TKey, TSchema, TInput>
    sync: CollectionSyncManager<TOutput, TKey, TSchema, TInput>
    events: CollectionEventsManager
    collection: CollectionImpl<TOutput, TKey, any, TSchema, TInput>
    state: CollectionStateManager<TOutput, TKey, TSchema, TInput>
  })

Source from the content-addressed store, hash-verified

36 constructor() {}
37
38 public setDeps(deps: {
39 lifecycle: CollectionLifecycleManager<TOutput, TKey, TSchema, TInput>
40 sync: CollectionSyncManager<TOutput, TKey, TSchema, TInput>
41 events: CollectionEventsManager
42 collection: CollectionImpl<TOutput, TKey, any, TSchema, TInput>
43 state: CollectionStateManager<TOutput, TKey, TSchema, TInput>
44 }) {
45 this.lifecycle = deps.lifecycle
46 this.sync = deps.sync
47 this.events = deps.events
48 this.collection = deps.collection
49 this.state = deps.state
50 }
51
52 /**
53 * Emit an empty ready event to notify subscribers that the collection is ready

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected