Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Map<KeyType, ValueType>

ES6 Map 的部分实现

Type parameters

  • KeyType

  • ValueType

Hierarchy

  • Map

Index

Properties

Methods

Properties

Private _keys

_keys: KeyType[] = []

Private _values

_values: ValueType[] = []

Methods

clear

  • clear(): void

get

  • get(key: KeyType): ValueType | undefined
  • Parameters

    • key: KeyType

    Returns ValueType | undefined

has

  • has(key: KeyType): boolean

keys

  • keys(): KeyType[]

set

  • set(key: KeyType, value: ValueType): void
  • Parameters

    • key: KeyType
    • value: ValueType

    Returns void

values

  • values(): ValueType[]

Generated using TypeDoc