function refSetValue
refSetValue<T>(
ctx: Context | null | undefined,
coder: Coder<T>,
value: T
): void

Sets a value in the context for a specific coder reference.

This function stores a value in the context's reference storage, making it available for resolution by references that use the same coder. It's typically used during encoding/decoding operations to populate the context with values that references need to resolve.

Type Parameters

Parameters

ctx: Context | null | undefined

The context to store the value in

coder: Coder<T>

The coder to associate with the value

value: T

The value to store

Return Type

void

Usage

import { refSetValue } from "mod.ts";