MCPcopy Index your code
hub / github.com/tinyplex/tinybase / resolveProvidedThing

Function resolveProvidedThing

src/ui-svelte/functions.svelte.ts:206–213  ·  view source on GitHub ↗
(
  thingOrThingId: MaybeGetter<UsedThing | Id | undefined>,
  offset: number,
)

Source from the content-addressed store, hash-verified

204): UsedThing | undefined => getThing(getContextValue(), thingOrThingId, offset);
205
206const resolveProvidedThing = <UsedThing extends Thing>(
207 thingOrThingId: MaybeGetter<UsedThing | Id | undefined>,
208 offset: number,
209): (() => UsedThing | undefined) => {
210 const contextValue = getContextValue();
211 return () =>
212 getThing<UsedThing>(contextValue, maybeGet(thingOrThingId), offset);
213};
214
215const getThingIds = (contextValue: ContextValue, offset: number): Ids =>
216 objIds((contextValue[offset * 2 + 1] ?? EMPTY_OBJ) as IdObj<unknown>);

Callers 8

resolveStoreFunction · 0.70
resolveMetricsFunction · 0.70
resolveIndexesFunction · 0.70
resolveRelationshipsFunction · 0.70
resolveQueriesFunction · 0.70
resolveCheckpointsFunction · 0.70
resolvePersisterFunction · 0.70
resolveSynchronizerFunction · 0.70

Calls 3

getContextValueFunction · 0.70
getThingFunction · 0.70
maybeGetFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…