Converts a structurally typed item
into a nominally typed JavaScript
object, optionally based on the provided prototype object
.
Converts a nominally typed JavaScript object
into its structurally typed
equivalent, optionally based on the provided prototype item
.
Returns the key of the tag attribute that distinguishes structures of this
Form
; returns undefined
if this Form
has no distinguishing tag
attribute. Used to accelerate distrcrimination of polymorphic structural
types with nominal type hints.
Returns a version of this Form
that requires a head [Attr] with the
given tag
name.
Returns a default–possibly undefined
–value of type T
. Used as the
fallback return value when [Item.coerce coercing] an invalid structural
value.
Returns a version of this Form
with the given unit
value.
Transformation between a structurally typed [Item] and a nominally typed JavaScript object.