Skip to main content

Interface: ReferenceSerializerOptions

Options of the built-in reference serializers.

Methods​

when()?​

optional when(node, info): boolean;

Decides, for every node the serializer could reference, whether it does. A node it declines falls through the list like any other value: a model ends up as its snapshot, a tree array or plain object is walked. The call's target ignores it: it is always a reference.

Defaults to declining value-type models: (node, { isValueType }) => !isValueType.

Parameters​

ParameterType
nodeobject
infoReferenceNodeInfo

Returns​

boolean