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

Function createVirtualProps

packages/db/src/virtual-props.ts:169–181  ·  view source on GitHub ↗
(
  key: TKey,
  collectionId: string,
  isSynced: boolean,
  origin: VirtualOrigin,
)

Source from the content-addressed store, hash-verified

167 * @internal
168 */
169export function createVirtualProps<TKey extends string | number>(
170 key: TKey,
171 collectionId: string,
172 isSynced: boolean,
173 origin: VirtualOrigin,
174): VirtualRowProps<TKey> {
175 return {
176 $synced: isSynced,
177 $origin: origin,
178 $key: key,
179 $collectionId: collectionId,
180 }
181}
182
183/**
184 * Enriches a row with virtual properties using the "add-if-missing" pattern.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected