Constructors
constructor
- new SmartMap(...indices: keyof T[]): SmartMap
-
Parameters
-
Rest ...indices: keyof T[]
Methods
[Symbol.iterator]
- [Symbol.iterator](): Iterator<T>
add
- add(...objects: T[]): void
contains
- contains(key: T[keyof T], index?: keyof T): boolean
-
Parameters
-
key: T[keyof T]
-
Default value index: keyof T = this.#indices[0]
Returns boolean
delete
- delete(key: string | number, index?: keyof T): undefined | T
-
Parameters
-
key: string | number
-
Default value index: keyof T = this.#indices[0]
Returns undefined | T
get
- get(key: string | number, index?: keyof T): T | undefined
-
Parameters
-
key: string | number
-
Default value index: keyof T = this.#indices[0]
Returns T | undefined
iterateBy
- iterateBy(index: keyof T): this
on
- on(name: EventType, listener: (options?: any) => void): this
-
Parameters
-
-
listener: (options?: any) => void
Returns this