Options
All
  • Public
  • Public/Protected
  • All
Menu

Base class for all managers

Type parameters

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _holds

The type of structure held by this manager

cache

cache: Collection<string, T>

The cache of the structures held by this manager

client

client: Client

Client that instantiated this class

Methods

Protected _search

add

  • add(id: string, cacheAfterFetching?: boolean, data: unknown): T
  • Converts raw data sent by the API to a structure and adds it to the cache

    Parameters

    • id: string

      The ID of the structure

    • cacheAfterFetching: boolean = true

      Whether to cache the structure or not

    • data: unknown

      The raw data returned by the API for this structure

    Returns T

resolve

  • resolve(idOrInstance: string | R): null | T
  • Resolves a structure resolvable to its respective structure

    Parameters

    • idOrInstance: string | R

      The ID or instance of the structure held by this manager

    Returns null | T

resolveID

  • resolveID(idOrInstance: string | R): null | string
  • Resolves a structure resolvable to its id

    Parameters

    • idOrInstance: string | R

      The ID or instance of the strucutre held by this manager

    Returns null | string

Legend

  • Constructor
  • Property
  • Method
  • Constructor
  • Property
  • Inherited property
  • Inherited method
  • Protected property
  • Protected method
  • Private property
  • Private method

Generated using TypeDoc