aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/bun-types/bun.d.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts
index a3bfa00b5..8eb664ce1 100644
--- a/packages/bun-types/bun.d.ts
+++ b/packages/bun-types/bun.d.ts
@@ -2617,7 +2617,7 @@ declare module "bun" {
clearAll(): void;
}
- var plugin: BunPlugin;
+ const plugin: BunPlugin;
interface Socket<Data = undefined> {
/**
@@ -2713,6 +2713,16 @@ declare module "bun" {
* This will return undefined if the socket was created by {@link Bun.connect} or if the listener has already closed.
*/
readonly listener?: SocketListener;
+
+ /**
+ * Remote IP address connected to the socket
+ */
+ readonly remoteAddress: string;
+
+ /**
+ * local port connected to the socket
+ */
+ readonly localPort: number;
}
interface SocketListener<Options extends SocketOptions = SocketOptions> {