docs(Structures): add ExtendableStructure typedef (#3908)

* docs(Structures): add ExtendableStructure typedef

* revert automatical package.json change
This commit is contained in:
Bence
2020-03-08 19:28:03 +01:00
committed by GitHub
parent b5dfb55923
commit 79a28b55a8

View File

@@ -1,5 +1,26 @@
'use strict';
/**
* An extendable structure:
* * **`GuildEmoji`**
* * **`DMChannel`**
* * **`TextChannel`**
* * **`VoiceChannel`**
* * **`CategoryChannel`**
* * **`NewsChannel`**
* * **`StoreChannel`**
* * **`GuildMember`**
* * **`Guild`**
* * **`Message`**
* * **`MessageReaction`**
* * **`Presence`**
* * **`ClientPresence`**
* * **`VoiceState`**
* * **`Role`**
* * **`User`**
* @typedef {string} ExtendableStructure
*/
/**
* Allows for the extension of built-in Discord.js structures that are instantiated by {@link BaseManager Managers}.
*/
@@ -22,7 +43,7 @@ class Structures {
* Extends a structure.
* <warn> Make sure to extend all structures before instantiating your client.
* Extending after doing so may not work as expected. </warn>
* @param {string} structure Name of the structure class to extend
* @param {ExtendableStructure} structure Name of the structure class to extend
* @param {Function} extender Function that takes the base class to extend as its only parameter and returns the
* extended class/prototype
* @returns {Function} Extended class/prototype returned from the extender