Type Parameters

Hierarchy (View Summary)

Constructors

Properties

Accessors

Methods

Constructors

Properties

_auth: null | AuthData = null
_logger: Logger
baseUrl: string
listeners: { [K in string | number | symbol]?: (data: E[K]) => void[] } = {}

Accessors

Methods

  • Remove an event listener

    Type Parameters

    • T extends string | number | symbol

    Parameters

    • event: T
    • listener: (data: E[T]) => void

    Returns void

  • Add an event listener, returns a function that can be called to remove the listener

    Type Parameters

    • T extends string | number | symbol

    Parameters

    • event: T
    • listener: (data: E[T]) => void

    Returns () => void

  • Add an event listener that will be called only once

    Type Parameters

    • T extends string | number | symbol

    Parameters

    • event: T
    • listener: (data: E[T]) => void

    Returns () => void

  • Type Parameters

    Parameters

    • path: string
    • body: Record<string, unknown> = {}

    Returns Promise<T>