Skip to content

Commit

Permalink
remove previous ignores and set variable names starting with _
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro committed Dec 10, 2023
1 parent b65254b commit 57fc094
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/send_queues/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,30 @@ class BaseSendQueue implements ISendQueue {
* @param canSend Function which should return whether send can be called
* @note If parameters are not passed, initialize() should be called later.
*/
constructor(sendNow?: (bytes: string) => number, canSend?: () => boolean) {
constructor(sendNow?: (_bytes: string) => number, canSend?: () => boolean) {
if (sendNow && canSend) {
this.initialize(sendNow, canSend);
} else if (sendNow || canSend) {
throw new Error('Both sendNow and canSend must be provided, or neither must.');
}
}
//ts-ignore
public sendNow: (bytes: string) => number = (bytes) => -1;
public sendNow: (_bytes: string) => number = (_bytes) => -1;
public canSend: () => boolean = () => false;

/**
* @param sendNow Function to call to send a message
* @param canSend Function which should return whether send can be called
*/
public initialize(sendNow: (bytes: string) => number, canSend: () => boolean) {
public initialize(sendNow: (_bytes: string) => number, canSend: () => boolean) {
this.sendNow = sendNow;
this.canSend = canSend;
}

//ts-ignore
public send(bytes: string): number {
public send(_bytes: string): number {
throw new Error('not implemented');
}

//ts-ignore
public queueMessage(bytes: string): boolean {
public queueMessage(_bytes: string): boolean {
throw new Error('not implemented');
}
public processQueue(): number {
Expand Down

0 comments on commit 57fc094

Please sign in to comment.