diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-04-05 17:01:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 17:01:03 -0600 |
commit | 0e4018a25bf4fb923f83c796b834ef718f6f75f9 (patch) | |
tree | fd5c7519a924dd20272df27b6d8c6093372cf4dd /ext/net/01_net.js | |
parent | 83f92474c5e8375ebe2213b4d62d4211fd011c2f (diff) |
fix(ext/net): Improve ts types for network APIs (#23228)
This currently fails to type-check in deno, but we know that listener is
a `Listener<TcpConn>` here and we should be able to improve the typing:
```
let listener = Deno.listen({ port: 0 });
console.log(listener.addr.port);
->
error: TS2339 [ERROR]: Property 'port' does not exist on type 'Addr'.
Property 'port' does not exist on type 'UnixAddr'.
let listener = Deno.listen({ port: 0 }); console.log(listener.addr.port)
```
After:
```
Check file:///tmp/test.ts
```
Diffstat (limited to 'ext/net/01_net.js')
0 files changed, 0 insertions, 0 deletions