API Reference
memoryFragmentValidAt()
Returns true when a fragment is valid at asOf.
Omitted asOf has no clock to compare against, so it admits only fragments that are live and not valid-time delayed.
Import
import { memoryFragmentValidAt } from "@graphrefly/ts/patterns";
Signature
function memoryFragmentValidAt(
fragment: MemoryFragment,
asOf?: bigint,
): boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
fragment | MemoryFragment | fragment value used by the helper. |
asOf | bigint | as of value used by the helper. |
Returns
A boolean value.
Example
import { memoryFragmentValidAt } from "@graphrefly/ts/patterns";
Source
packages/ts/src/patterns/semantic-memory.ts