Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PoolManager

Hierarchy

  • PoolManager

Index

Constructors

Private constructor

Properties

Static Private poolList

poolList: {} = {}

Type declaration

  • [poolKey: string]: Pool

Static Private subscribeList

subscribeList: PoolManagerCallback[] = []

Methods

Static append

  • append<T>(promise: Promise<T>, poolKey?: string): void
  • Adds the promise to the target pool and notifies listeners

    Type parameters

    • T

    Parameters

    • promise: Promise<T>

      Promise

    • poolKey: string = "default"

      Default value is 'default'

    Returns void

Static get

  • get(poolKey?: string): Pool
  • Returns the pool or create if not exist

    Parameters

    • poolKey: string = "default"

      Default value is 'default'

    Returns Pool

Static Private getPoolListener

Static subscribe

  • Subscribe according to the specified pool key or keys

    Parameters

    • callback: PoolManagerSubscribeCallback

      Callback function

    • poolKey: string | string[] = "default"

      Single or multiple unique pool key. Default value is 'default'

    Returns () => void

    Unsubscribe function

      • (): void
      • Returns void

Generated using TypeDoc