Skip to content

wrapValue ​

The wrapValue() function wraps a value in a marked container (SymbolWrappedValue) to identify it unambiguously in composite structures.

Interactive example ​

Syntax ​

typescript
function wrapValue<
	const GenericInput extends unknown
>(
	input: GenericInput
): WrappedValue<GenericInput>;

Parameters ​

  • input : Value to wrap.

Return value ​

A WrappedValue object containing the original value and the symbolic marker.

See also ​

Released under the MIT license.