From 1c6ca35e6fbcec1a73258761ea21db251a6b22ca Mon Sep 17 00:00:00 2001 From: JadlionHD <48410066+JadlionHD@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:50:25 +0700 Subject: [PATCH] fix client PeerData type --- src/structures/Client.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/structures/Client.ts b/src/structures/Client.ts index 0c50eb8..fcd33e5 100644 --- a/src/structures/Client.ts +++ b/src/structures/Client.ts @@ -3,7 +3,7 @@ import { Caching, ClientOptions, ClientType } from "../../types/client"; import { PacketTypes } from "../util/Constants"; import { parseText } from "../util/Utils"; import { Peer } from "./Peer"; -import { ActionEvent, LoginInfo } from "../../types"; +import { ActionEvent, LoginInfo, PeerData } from "../../types"; import { TankPacket } from "../packets/TankPacket"; import { WebServer } from "./WebServer"; const Native = require("../../build/Release/gtjs.node").Client; @@ -45,9 +45,18 @@ class Client extends EventEmitter { public on(event: "connect", listener: (netID: number) => void): this; public on(event: "raw", listener: (netID: number, data: Buffer) => void): this; - public on(event: "action", listener: (peer: Peer, data: ActionEvent) => void): this; - public on(event: "tank", listener: (peer: Peer, data: TankPacket) => void): this; - public on(event: "text", listener: (peer: Peer, data: LoginInfo) => void): this; + public on( + event: "action", + listener: (peer: Peer, data: ActionEvent) => void + ): this; + public on( + event: "tank", + listener: (peer: Peer, data: TankPacket) => void + ): this; + public on( + event: "text", + listener: (peer: Peer, data: LoginInfo) => void + ): this; public on(event: "ready", listener: () => void): this; public on(event: "error", listener: (error: Error, data?: Buffer) => void): this; public on(event: "disconnect", listener: (netID: number) => void): this;