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

Method setDeps

packages/db/src/collection/indexes.ts:226–236  ·  view source on GitHub ↗
(deps: {
    state: CollectionStateManager<TOutput, TKey, TSchema, TInput>
    lifecycle: CollectionLifecycleManager<TOutput, TKey, TSchema, TInput>
    defaultIndexType?: IndexConstructor<TKey>
    events: CollectionEventsManager
  })

Source from the content-addressed store, hash-verified

224 constructor() {}
225
226 setDeps(deps: {
227 state: CollectionStateManager<TOutput, TKey, TSchema, TInput>
228 lifecycle: CollectionLifecycleManager<TOutput, TKey, TSchema, TInput>
229 defaultIndexType?: IndexConstructor<TKey>
230 events: CollectionEventsManager
231 }) {
232 this.state = deps.state
233 this.lifecycle = deps.lifecycle
234 this.defaultIndexType = deps.defaultIndexType
235 this.events = deps.events
236 }
237
238 /**
239 * Creates an index on a collection for faster queries.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected