Immutability
Creating an immutable Unit
const immutableDict = new DictUnit({immutable: true});
// we're done, it's immutable nowMaking all Units immutable
Configuration.set({
UNITS: {immutable: true}
});
// all the Units initialized after this will be immutable,
// if not configured otherwise
const immutableList = new ListUnit(); // immutable
// override global config
const mutableList = new ListUnit({immutable: false}); // mutableEfficiency and precautions
Supported data types
Last updated
Was this helpful?