A node that represents the value of a struct.
Attribute | Type | Description |
---|---|---|
kind |
"structValueNode" |
The node discriminator. |
Attribute | Type | Description |
---|---|---|
fields |
StructFieldValueNode [] |
The value of all fields in the struct. |
Helper function that creates a StructValueNode
object from an array of field value nodes.
const node = structValueNode([
structFieldValueNode('name', stringValueNode('Alice')),
structFieldValueNode('age', numberValueNode(42)),
]);