The type of item being stored
A tuple representing the arguments for .get(...)
Used to create a new item if it doesn't exist in the map.
Receives the arguments passed to .get(...)
Clears all items from the map
If an item was already created with the given arguments, return that item.
Otherwise, create a new item,
passing the arguments to the createItem
function.
Gets all the values in the map.
This is an iterator, so you need to convert it to an array to use array methods,
e.g. [...map.values].map(...)
Generated using TypeDoc
A map which creates new items if they don't already exist. Useful for guaranteeing the existence of values without null checks all over the place