You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: TS2339 [ERROR]: Property 'hostname' does not exist on type 'Addr'.
Property 'hostname' does not exist on type 'UnixAddr'.
const peerHost: string = req.conn.remoteAddr.hostname;
When I replace req.conn.remoteAddr.hostname with (req.conn.remoteAddr as Deno.NetAddr).hostname everything works as expected:
Started
Host 127.0.0.1 connected
The full remoteAddr looks similar to { hostname: "127.0.0.1", port: 64859, transport: "tcp" }
Steps to reproduce
For the example code:
I get:
When I replace
req.conn.remoteAddr.hostname
with(req.conn.remoteAddr as Deno.NetAddr).hostname
everything works as expected:The full
remoteAddr
looks similar to{ hostname: "127.0.0.1", port: 64859, transport: "tcp" }
Version
The text was updated successfully, but these errors were encountered: