Skip to content

Commit 6ab7685

Browse files
committed
chore: exclude EventEmitter methods
1 parent e8d30bc commit 6ab7685

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/discord.js/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
"no-restricted-syntax": [
224224
2,
225225
{
226-
"selector": "MethodDefinition > TSEmptyBodyFunctionExpression > Identifier :not(TSTypeOperator[operator=readonly]) > TSArrayType",
226+
"selector": "MethodDefinition[key.name!=on][key.name!=once][key.name!=off] > TSEmptyBodyFunctionExpression > Identifier :not(TSTypeOperator[operator=readonly]) > TSArrayType",
227227
"message": "Array parameters on methods must be readonly"
228228
},
229229
{

packages/discord.js/typings/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,7 +2591,7 @@ export class ReactionCollector extends Collector<Snowflake | string, MessageReac
25912591
event: 'end',
25922592
listener: (collected: ReadonlyCollection<Snowflake, MessageReaction>, reason: string) => void,
25932593
): this;
2594-
public on(event: string, listener: (...args: readonly any[]) => void): this;
2594+
public on(event: string, listener: (...args: any[]) => void): this;
25952595

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

26072607
export class ReactionEmoji extends Emoji {

0 commit comments

Comments
 (0)