TanStack

hasVirtualProps

ts
function hasVirtualProps(value): value is VirtualRowProps;

Defined in: packages/db/src/virtual-props.ts:178

Checks if a value has virtual properties attached. Legacy rows with the original four properties still match; only rows published by this version are guaranteed to carry $hasPendingWrites.

Parameters

value

unknown

The value to check

Returns

value is VirtualRowProps

true if the value has virtual properties

Example

ts
if (hasVirtualProps(row) && row.$hasPendingWrites !== undefined) {
  console.log('Pending local writes:', row.$hasPendingWrites)
}