Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SmartMap<T>

Type parameters

  • T

Hierarchy

  • SmartMap

Implements

  • Iterable<T>

Index

Constructors

constructor

  • new SmartMap(...indices: keyof T[]): SmartMap

Accessors

indices

  • get indices(): keyof T[]

length

  • get length(): number

Methods

[Symbol.iterator]

  • [Symbol.iterator](): Iterator<T>

add

  • add(...objects: T[]): void
  • Parameters

    • Rest ...objects: T[]

    Returns void

clear

  • clear(): 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

fire

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

    • name: EventType
    • listener: (options?: any) => void
        • (options?: any): void
        • Parameters

          • Optional options: any

          Returns void

    Returns this

Generated using TypeDoc