mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs(Structures): add ExtendableStructure typedef (#3908)
* docs(Structures): add ExtendableStructure typedef * revert automatical package.json change
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user