Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(LimitedCollection): export LimitedCollection #6043

Merged
merged 4 commits into from Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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