<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">For the example code:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { serve } from &quot;https://deno.land/std@0.50.0/http/server.ts&quot;;

const server = serve({ port: 8000 });

console.log(&quot;Started&quot;);

for await (const req of server) {
    const peerHost: string = req.conn.remoteAddr.hostname;

    console.log(`Host ${peerHost} connected`);

    req.respond({});
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">serve</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"https://deno.land/std@0.50.0/http/server.ts"</span><span class="pl-kos">;</span>

<span class="pl-k">const</span> <span class="pl-s1">server</span> <span class="pl-c1">=</span> <span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">port</span>: <span class="pl-c1">8000</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">"Started"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">for</span> <span class="pl-k">await</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">req</span> <span class="pl-k">of</span> <span class="pl-s1">server</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">const</span> <span class="pl-s1">peerHost</span>: <span class="pl-smi">string</span> <span class="pl-c1">=</span> <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">conn</span><span class="pl-kos">.</span><span class="pl-c1">remoteAddr</span><span class="pl-kos">.</span><span class="pl-c1">hostname</span><span class="pl-kos">;</span>

    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">`Host <span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">peerHost</span><span class="pl-kos">}</span></span> connected`</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-en">respond</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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;"><pre class="notranslate"><code class="notranslate">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;
</code></pre></div>
<p dir="auto">When I replace <code class="notranslate">req.conn.remoteAddr.hostname</code> with <code class="notranslate">(req.conn.remoteAddr as Deno.NetAddr).hostname</code> everything works as expected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Started
Host 127.0.0.1 connected"><pre class="notranslate"><code class="notranslate">Started
Host 127.0.0.1 connected
</code></pre></div>
<p dir="auto">The full <code class="notranslate">remoteAddr</code> looks similar to <code class="notranslate">{ hostname: "127.0.0.1", port: 64859, transport: "tcp" }</code></p>
<h2 dir="auto">Version</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ deno --version
deno 1.0.0
v8 8.4.300
typescript 3.9.2"><pre class="notranslate"><code class="notranslate">$ deno --version
deno 1.0.0
v8 8.4.300
typescript 3.9.2
</code></pre></div>
<p dir="auto">Ctrl+Z stopped Deno run<br>
but I don't know why, after another <code class="notranslate">deno run</code> the port of the server (was 8080) were still in use.<br>
so I tried to use a random free port with the 0.</p>
<p dir="auto">after a console.warn(server), I got:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Server {
 listener: ListenerImpl { rid: 5, addr: { hostname: &quot;127.0.0.1&quot;, port: 34263, transport: &quot;tcp&quot; } },
 closing: false,
 connections: []
}"><pre class="notranslate"><code class="notranslate">Server {
 listener: ListenerImpl { rid: 5, addr: { hostname: "127.0.0.1", port: 34263, transport: "tcp" } },
 closing: false,
 connections: []
}
</code></pre></div>
<p dir="auto">but when I tried to access to the port with <code class="notranslate">server.listener.addr.port</code>, I had this message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error TS2339: Property 'port' does not exist on type 'Addr'.
  Property 'port' does not exist on type 'UnixAddr'."><pre class="notranslate"><code class="notranslate">error TS2339: Property 'port' does not exist on type 'Addr'.
  Property 'port' does not exist on type 'UnixAddr'.
</code></pre></div>
<p dir="auto">it doesn't make sense. it seems like port is not defined on type Addr (obvious but confusing)</p>