Files
webnet/packages/tsconnect/tsconfig.json
T
codinget bdc4bcccee feat(tsconnect): add TCPListener and tighten dial/listen network types
Type the new TCP listening surface from the tailscale submodule:

- listen() is now overloaded: tcp/tcp4/tcp6 returns a TCPListener,
  udp/udp4/udp6 returns a PacketConn. The network parameter is a
  literal union instead of a bare string so callers get completion
  and typo protection.
- TCPListener extends AsyncIterable<Conn>, so consumers can write
  `for await (const conn of listener)`.
- dial() drops "udp" from its accepted networks. Connected UDP
  through a stream-shaped Conn was confusing; UDP belongs in
  listen(), and ICMP in listenICMP(). The Go side still accepts
  whatever string for callers who really want to bypass the type.

Bumps the TS lib/target to ES2018 for AsyncIterable, bumps the
tailscale submodule, and updates the test-app inline example to
demonstrate `for await` over a TCP listener.
2026-04-10 21:09:55 +00:00

15 lines
278 B
JSON

{
"compilerOptions": {
"target": "ES2018",
"module": "ES2020",
"moduleResolution": "node",
"strict": true,
"declaration": true,
"outDir": "out",
"rootDir": "src",
"sourceMap": true,
"lib": ["ES2018", "DOM"]
},
"include": ["src/**/*"]
}