Skip to content

Commit

Permalink
fix(typings): Change method signature to property signature (#22)
Browse files Browse the repository at this point in the history
* ts: Change method signature to property signature

* ts: Change method signature to property signature

* ts: Change method signature to property signature
  • Loading branch information
kyranet authored and Will Nelson committed Oct 20, 2019
1 parent 0a75e1f commit ea3fe5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/ClusterNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,5 @@ export default class ClusterNode extends BaseNode {
return this.cluster.emit(name, ...args);
}

public send(guildID: string, pk: object): Promise<any> {
return this.cluster.send(guildID, pk);
}
public send = (guildID: string, pk: object): Promise<any> => this.cluster.send(guildID, pk);
}
4 changes: 2 additions & 2 deletions src/base/Cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Player from '../core/Player';
import { VoiceStateUpdate, VoiceServerUpdate } from './Node';

export default abstract class BaseCluster extends EventEmitter {
public abstract send(guildID: string, packet: any): any;
public abstract filter(node: ClusterNode, guildID: string): boolean;
public abstract send: (guildID: string, packet: any) => any;
public abstract filter: (node: ClusterNode, guildID: string) => boolean;

public readonly nodes: ClusterNode[] = [];

Expand Down
2 changes: 1 addition & 1 deletion src/base/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface BaseNodeOptions {
}

export default abstract class BaseNode extends EventEmitter {
public abstract send(guildID: string, packet: any): Promise<any>;
public abstract send: (guildID: string, packet: any) => Promise<any>;

public password: string;
public userID: string;
Expand Down

0 comments on commit ea3fe5b

Please sign in to comment.