From 79a28b55a8b1d9ce3fc0e559b0f2dcc0e7e89faf Mon Sep 17 00:00:00 2001 From: Bence <56838314+1s3k3b@users.noreply.github.com> Date: Sun, 8 Mar 2020 19:28:03 +0100 Subject: [PATCH] docs(Structures): add ExtendableStructure typedef (#3908) * docs(Structures): add ExtendableStructure typedef * revert automatical package.json change --- src/util/Structures.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/util/Structures.js b/src/util/Structures.js index e80158a81..0c6ab35c7 100644 --- a/src/util/Structures.js +++ b/src/util/Structures.js @@ -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. * Make sure to extend all structures before instantiating your client. * Extending after doing so may not work as expected. - * @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