GraphReFlyTS

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

ParameterTypeDescription
fragmentMemoryFragmentfragment value used by the helper.
asOfbigintas 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