Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.02 KB

MapValueNode.md

File metadata and controls

31 lines (21 loc) · 1.02 KB

MapValueNode

A node that represents the value of a map.

Attributes

Data

Attribute Type Description
kind "mapValueNode" The node discriminator.

Children

Attribute Type Description
entries MapEntryValueNode[] The value of all entries in the map.

Functions

mapValueNode(entries)

Helper function that creates a MapValueNode object from an array of MapEntryValueNode objects. Each object represents a key-value pair in the map.

const node = mapValueNode([
    mapEntryValueNode(stringValueNode('apples'), numberValueNode(12)),
    mapEntryValueNode(stringValueNode('bananas'), numberValueNode(34)),
    mapEntryValueNode(stringValueNode('carrots'), numberValueNode(56)),
]);