Delegate {@link Layout#fromArray|fromArray} to {@link VariantLayout#layout|layout}.
Function to create an Object into which decoded properties will be written.
Used only for layouts that {@link Layout#decode|decode} to Object instances, which means:
If left undefined the JavaScript representation of these layouts will be Object instances.
Replicate the layout using a new property.
This function must be used to get a structurally-equivalent layout with a different name since all Layout instances are immutable.
NOTE This is a shallow copy. All fields except {@link Layout#property|property} are strictly equal to the origin layout.
the value for {@link Layout#property|property} in the replica.
property
.Generated using TypeDoc
Represent a specific variant within a containing union.
NOTE The {@link Layout#span|span} of the variant may include the span of the {@link Union#discriminator|discriminator} used to identify it, but values read and written using the variant strictly conform to the content of {@link VariantLayout#layout|layout}.
NOTE User code should not invoke this constructor directly. Use the union {@link Union#addVariant|addVariant} helper method.
initializer for {@link VariantLayout#union|union}.
initializer for {@link VariantLayout#variant|variant}.
initializer for {@link VariantLayout#layout|layout}. If absent the variant carries no data.
initializer for {@link Layout#property|property}. Unlike many other layouts, variant layouts normally include a property name so they can be identified within their containing Union. The property identifier may be absent only if
layout
is is absent.