mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
docs: add extends to ChannelManager, cache is not nullable, resolveID accepts an object (#3771)
* Add extends to docs * Cache shouldn't be nullable * jsdoc: use same type for both resolve methods
This commit is contained in:
@@ -35,7 +35,7 @@ class BaseManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the cache for the data model
|
* Holds the cache for the data model
|
||||||
* @type {?Collection}
|
* @type {Collection}
|
||||||
*/
|
*/
|
||||||
this.cache = new cacheType(...cacheOptions);
|
this.cache = new cacheType(...cacheOptions);
|
||||||
if (iterable) for (const i of iterable) this.add(i);
|
if (iterable) for (const i of iterable) this.add(i);
|
||||||
@@ -64,7 +64,7 @@ class BaseManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a data entry to a instance ID.
|
* Resolves a data entry to a instance ID.
|
||||||
* @param {string|Instance} idOrInstance The id or instance of something in this Manager
|
* @param {string|Object} idOrInstance The id or instance of something in this Manager
|
||||||
* @returns {?Snowflake}
|
* @returns {?Snowflake}
|
||||||
*/
|
*/
|
||||||
resolveID(idOrInstance) {
|
resolveID(idOrInstance) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ const { Events } = require('../util/Constants');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A manager of channels belonging to a client
|
* A manager of channels belonging to a client
|
||||||
|
* @extends {BaseManager}
|
||||||
*/
|
*/
|
||||||
class ChannelManager extends BaseManager {
|
class ChannelManager extends BaseManager {
|
||||||
constructor(client, iterable) {
|
constructor(client, iterable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user