type alias RefValue

A type representing a reference value that can be resolved during encoding/decoding.

This type represents a function that takes a context and returns the resolved value. References are used to defer value resolution until the encoding/decoding context is available, enabling circular and self-referential data structures.

Type Parameters

TDecoded

The type of the decoded value

Call Signatures

(ctx: Context): TDecoded

Resolves the reference against a context and returns the stored value.

Properties

Brand marker identifying the function as a reference value.

Usage

import { type RefValue } from "ref/ref.ts";