new map [of] %keyType:EXPR% to %valueType:EXPR% — Expressions

new map [of] %keyType:EXPR% to %valueType:EXPR%
Map1.2.0

Description

Creates a new empty typed map. Entries added to this map will be validated against the declared key and value types.

Examples

set scores to new map of string to int
set data to new map string to player

All Possible Usages (2)

Every distinct way you can write this pattern, with optional groups and choice groups expanded. Placeholders are shown as <name>.

new map <keyType> to <valueType>
new map of <keyType> to <valueType>

Related (Map)