Skip to content

Commit

Permalink
fix: prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
nayounsang committed Oct 23, 2024
1 parent 5dbedff commit 9cfe5ad
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/socket.io-client/lib/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ interface SocketReservedEvents {
connect_error: (err: Error) => void;
disconnect: (
reason: Socket.DisconnectReason,
description?: DisconnectDescription
description?: DisconnectDescription,
) => void;
}

Expand Down Expand Up @@ -555,7 +555,7 @@ export class Socket<
debug(
"packet [%d] is discarded after %d tries",
packet.id,
packet.tryCount
packet.tryCount,
);
this._queue.shift();
if (ack) {
Expand Down Expand Up @@ -592,7 +592,7 @@ export class Socket<
if (packet.pending && !force) {
debug(
"packet [%d] has already been sent and is waiting for an ack",
packet.id
packet.id,
);
return;
}
Expand Down Expand Up @@ -666,7 +666,7 @@ export class Socket<
*/
private onclose(
reason: Socket.DisconnectReason,
description?: DisconnectDescription
description?: DisconnectDescription,
): void {
debug("close (%s)", reason);
this.connected = false;
Expand All @@ -684,7 +684,7 @@ export class Socket<
private _clearAcks() {
Object.keys(this.acks).forEach((id) => {
const isBuffered = this.sendBuffer.some(
(packet) => String(packet.id) === id
(packet) => String(packet.id) === id,
);
if (!isBuffered) {
// note: handlers that do not accept an error as first argument are ignored here
Expand Down Expand Up @@ -717,8 +717,8 @@ export class Socket<
this.emitReserved(
"connect_error",
new Error(
"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"
)
"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)",
),
);
}
break;
Expand Down Expand Up @@ -968,7 +968,7 @@ export class Socket<
* @returns self
*/
public timeout(
timeout: number
timeout: number,
): Socket<ListenEvents, DecorateAcknowledgements<EmitEvents>> {
this.flags.timeout = timeout;
return this;
Expand Down Expand Up @@ -1161,7 +1161,7 @@ export class Socket<
*/
public on<Ev extends ReservedOrUserEventNames<ReservedEvents, ListenEvents>>(
ev: Ev,
listener: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>
listener: ReservedOrUserListener<ReservedEvents, ListenEvents, Ev>,
): this {
return super.on<Ev>(ev, listener);
}
Expand Down

0 comments on commit 9cfe5ad

Please sign in to comment.