Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: exclude EventEmitter methods
Browse files Browse the repository at this point in the history
almeidx committed Feb 23, 2024

Verified

This commit was signed with the committer’s verified signature.
prabhu prabhu
1 parent d94634f commit bd2d9da
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/discord.js/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -223,7 +223,7 @@
"no-restricted-syntax": [
2,
{
"selector": "MethodDefinition > TSEmptyBodyFunctionExpression > Identifier :not(TSTypeOperator[operator=readonly]) > TSArrayType",
"selector": "MethodDefinition[key.name!=on][key.name!=once][key.name!=off] > TSEmptyBodyFunctionExpression > Identifier :not(TSTypeOperator[operator=readonly]) > TSArrayType",
"message": "Array parameters on methods must be readonly"
},
{
4 changes: 2 additions & 2 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -2609,7 +2609,7 @@ export class ReactionCollector extends Collector<Snowflake | string, MessageReac
event: 'end',
listener: (collected: ReadonlyCollection<Snowflake, MessageReaction>, reason: string) => void,
): this;
public on(event: string, listener: (...args: readonly any[]) => void): this;
public on(event: string, listener: (...args: any[]) => void): this;

public once(
event: 'collect' | 'dispose' | 'remove' | 'ignore',
@@ -2619,7 +2619,7 @@ export class ReactionCollector extends Collector<Snowflake | string, MessageReac
event: 'end',
listener: (collected: ReadonlyCollection<Snowflake, MessageReaction>, reason: string) => void,
): this;
public once(event: string, listener: (...args: readonly any[]) => void): this;
public once(event: string, listener: (...args: any[]) => void): this;
}

export class ReactionEmoji extends Emoji {

0 comments on commit bd2d9da

Please sign in to comment.