Skip to content

Commit

Permalink
fix: EventEmitter on method signatures to use spread syntax (#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
KunZhou-at authored Sep 6, 2023
1 parent a0e0e2f commit 5d21b81
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion promise.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export interface PoolCluster extends EventEmitter {

of(pattern: string, selector?: string): PoolNamespace;

on(event: string, listener: (args: any[]) => void): this;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'remove', listener: (nodeId: number) => void): this;
on(event: 'warn', listener: (err: Error) => void): this;
}
Expand Down
2 changes: 1 addition & 1 deletion typings/mysql/lib/Connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ declare class Connection extends QueryableBase(ExecutableBase(EventEmitter)) {

format(sql: string, values?: any | any[] | { [param: string]: any }): string;

on(event: string, listener: (args: any[]) => void): this;
on(event: string, listener: (...args: any[]) => void): this;

rollback(callback: (err: QueryError | null) => void): void;

Expand Down
2 changes: 1 addition & 1 deletion typings/mysql/lib/Pool.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ declare class Pool extends QueryableBase(ExecutableBase(EventEmitter)) {
callback?: (err: NodeJS.ErrnoException | null, ...args: any[]) => any
): void;

on(event: string, listener: (args: any[]) => void): this;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'connection', listener: (connection: PoolConnection) => any): this;
on(event: 'acquire', listener: (connection: PoolConnection) => any): this;
on(event: 'release', listener: (connection: PoolConnection) => any): this;
Expand Down
2 changes: 1 addition & 1 deletion typings/mysql/lib/PoolCluster.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ declare class PoolCluster extends EventEmitter {

of(pattern: string, selector?: string): PoolNamespace;

on(event: string, listener: (args: any[]) => void): this;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'remove', listener: (nodeId: number) => void): this;
on(event: 'warn', listener: (err: Error) => void): this;
}
Expand Down
2 changes: 1 addition & 1 deletion typings/mysql/lib/protocol/sequences/Query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ declare class Query extends Sequence {
*/
stream(options?: StreamOptions): Readable;

on(event: string, listener: (args: any[]) => void): this;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'error', listener: (err: QueryError) => any): this;
on(
event: 'fields',
Expand Down

0 comments on commit 5d21b81

Please sign in to comment.