Class ChainMap<K, V>

链式字典。

使用WeakMap构建的,支持多个key数组对应一个值。

Type Parameters

  • K extends any[]

  • V

Hierarchy

  • ChainMap

Constructors

Properties

Methods

Constructors

  • Type Parameters

    • K extends any[]

    • V

    Returns ChainMap<K, V>

Properties

_数量: number = 0
_根字典: WeakMap<any, any> = ...

根字典。

Methods

  • 删除映射。

    Parameters

    • keys: K

      键。

    Returns boolean

    如果找到目标值且被删除返回 true ,否则返回 false

  • 获取键对应的值。

    Parameters

    • keys: K

      键。

    Returns V

    值。

  • 设置映射。

    Parameters

    • keys: K

      键。

    • value: V

      值。

    Returns V

    返回设置的值。

Generated using TypeDoc