Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BasePool<K, V>

Type parameters

  • K

  • V

Hierarchy

  • Map<K, V>
    • BasePool

Index

Constructors

constructor

  • new BasePool<K, V>(client: Client, name: string, type: unknown): BasePool<K, V>

Properties

Readonly [toStringTag]

[toStringTag]: string

Readonly client

client: Client

Readonly name

name: string

The name of the pool

Readonly size

size: number

Readonly type

type: unknown

The class type the pool holds

Static Readonly [species]

[species]: MapConstructor

Methods

[iterator]

  • [iterator](): IterableIterator<[K, V]>
  • Returns an iterable of entries in the map.

    Returns IterableIterator<[K, V]>

Private _walk

  • _walk(): Promise<Item[]>

clear

  • clear(): void
  • Returns void

delete

  • delete(key: K): boolean
  • Parameters

    • key: K

    Returns boolean

entries

  • entries(): IterableIterator<[K, V]>
  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[K, V]>

forEach

  • forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void
  • Parameters

    • callbackfn: (value: V, key: K, map: Map<K, V>) => void
        • (value: V, key: K, map: Map<K, V>): void
        • Parameters

          • value: V
          • key: K
          • map: Map<K, V>

          Returns void

    • Optional thisArg: any

    Returns void

get

  • get(key: K): undefined | V
  • Parameters

    • key: K

    Returns undefined | V

has

  • has(key: K): boolean
  • Parameters

    • key: K

    Returns boolean

init

  • init(): Promise<boolean>

keys

  • keys(): IterableIterator<K>
  • Returns an iterable of keys in the map

    Returns IterableIterator<K>

load

  • load(filePath: string): Promise<boolean>

set

  • Parameters

    • key: K
    • value: V

    Returns BasePool<K, V>

values

  • values(): IterableIterator<V>
  • Returns an iterable of values in the map

    Returns IterableIterator<V>

Generated using TypeDoc