✨TypedMap
subclass of Map that checks key/value types.
Last updated
Was this helpful?
subclass of Map that checks key/value types.
Last updated
Was this helpful?
Was this helpful?
JS ⟩ value ⟩ object ⟩ class ⟩ example ⟩ TypedMap
key points:
must call superclass constructor super()
before using this.
use super.method()
to call superclass methods in subclass methods.
replit ⟩ TypedMap
// superclass
class TypedMap extends Map {
// private properties
#keyType;
#valueType;
// ⭐ subclass constructor
constructor(keyType, valueType, entries) {