Abstract

DataManager

export abstract class DataManager<Key, Holds, Resolvable> extends BaseManager
export abstract class DataManager<Key, Holds, Resolvable> extends BaseManager
Manages the API methods of a data model along with a collection of instances.
NameConstraintsOptionalDefaultDescription
KeyNoNone
HoldsNoNone
ResolvableNoNone
constructor(client, holds)
Constructs a new instance of the DataManager class
NameTypeOptionalDescription
clientClient<true>NoNone
holdsConstructable<Holds>NoNone
Readonly
cache:Collection<Key, Holds>
The cache of items for this manager.
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):Key
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceKey | HoldsNoThe id or instance of something in this Manager
valueOf():Collection<Key, Holds>