Options
All
  • Public
  • Public/Protected
  • All
Menu

es6-timed-map

Index

Type Aliases

ExpirationCallback<Key, Value>: ((key: Key, value: Value) => void)

Type Parameters

  • Key

  • Value

Type declaration

    • (key: Key, value: Value): void
    • Type representing a the callback signature called when something timesout.

      Parameters

      • key: Key
      • value: Value

      Returns void

SetParams<Key, Value>: { expirationCallback?: ExpirationCallback<Key, Value>; expirationTime: number; key: Key; value: Value }

Type that represents the set methods single argument option

Type Parameters

  • Key

  • Value

Type declaration

  • Optional expirationCallback?: ExpirationCallback<Key, Value>
  • expirationTime: number
  • key: Key
  • value: Value
Timeout<K, V>: [id: TimeoutID, start: number, ms: number, callback: ((key: K, value: V) => void) | undefined]

Data saved for individual _timers.

Type Parameters

  • K

  • V

TimeoutID: NodeJS.Timeout | number

Type representing a TimeoutID for a nodejs.timeout timer.

Functions

  • isSetParams<Key, Value>(key: Key | SetParams<Key, Value>, value?: Value, expirationTime?: number, expirationCallback?: ExpirationCallback<Key, Value>): key is SetParams<Key, Value>
  • Type-guard used in conjunection with other checks to verify the given key is a SetParam.

    Type Parameters

    • Key

    • Value

    Parameters

    • key: Key | SetParams<Key, Value>
    • Optional value: Value
    • Optional expirationTime: number
    • Optional expirationCallback: ExpirationCallback<Key, Value>

    Returns key is SetParams<Key, Value>

Generated using TypeDoc