Skip to content

Commit

Permalink
feat(LimitedCollection): export LimitedCollection (#6043)
Browse files Browse the repository at this point in the history
* feat(LimitedCollection): export LimitedCollection

* fix: remove @Private

* fix: typings
  • Loading branch information
PanSzelescik committed Jul 5, 2021
1 parent 34708d6 commit 31d3129
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/index.js
Expand Up @@ -21,6 +21,7 @@ module.exports = {
DiscordAPIError: require('./rest/DiscordAPIError'),
HTTPError: require('./rest/HTTPError'),
RateLimitError: require('./rest/RateLimitError'),
LimitedCollection: require('./util/LimitedCollection'),
MessageFlags: require('./util/MessageFlags'),
Intents: require('./util/Intents'),
Options: require('./util/Options'),
Expand Down
1 change: 0 additions & 1 deletion src/util/LimitedCollection.js
Expand Up @@ -8,7 +8,6 @@ const Collection = require('./Collection.js');
* @extends {Collection}
* @param {number} [maxSize=0] The maximum size of the Collection
* @param {Iterable} [iterable=null] Optional entries passed to the Map constructor.
* @private
*/
class LimitedCollection extends Collection {
constructor(maxSize = 0, iterable = null) {
Expand Down
5 changes: 5 additions & 0 deletions typings/index.d.ts
Expand Up @@ -911,6 +911,11 @@ export class InviteGuild extends AnonymousGuild {
public welcomeScreen: WelcomeScreen | null;
}

export class LimitedCollection<K, V> extends Collection<K, V> {
public constructor(maxSize?: number, iterable?: Iterable<readonly [K, V]>);
public maxSize: number;
}

export class Message extends Base {
public constructor(client: Client, data: unknown, channel: TextChannel | DMChannel | NewsChannel | ThreadChannel);
private patch(data: unknown): Message;
Expand Down

0 comments on commit 31d3129

Please sign in to comment.