deno_doc
deno_doc copied to clipboard
APIs missing from docs
It seems like somewhere during the migration to extensions, some of the APIs no longer appear in the docs. (e.g. Deno.serveHttp, Deno.RequestEvent, and other types from lib.deno_net.unstable.d.ts are missing from the unstable documentation): https://doc.deno.land/builtin/unstable
I haven't noticed that the CLI output deno [--unstable] types is missing anything, but it might be worth checking at the same time.
deno doc doesn't seem to support triple slash directives. lib.deno_net.unstable.d.ts is referenced using triple slash directives in lib.deno.unstable.d.ts.
Reproduction:
$ deno doc https://raw.githubusercontent.com/denoland/deno/main/cli/dts/lib.deno.unstable.d.ts | grep -i "connect"
<...empty>
$ deno doc https://raw.githubusercontent.com/denoland/deno/main/extensions/net/lib.deno_net.unstable.d.ts | grep -i "connect"
interface UnixConnectOptions
function connect(options: ConnectOptions | UnixConnectOptions): Promise<Conn>
Connects to the hostname (default is "127.0.0.1") and port on the named
transport (default is "tcp"), and resolves to the connection (`Conn`).
const conn1 = await Deno.connect({ port: 80 });
const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 });
const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 });
const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" });
const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" });
Start TLS handshake from an existing connection using
Using this function requires that the other end of the connection is
const conn = await Deno.connect({ port: 80, hostname: "127.0.0.1" });
This might be the same reason why https://doc.deno.land/builtin/unstable is missing these docs too.
This might be the same reason why https://doc.deno.land/builtin/unstable is missing these docs too.
This is why we use the output of deno types (uploaded on release) for https://doc.deno.land/builtin/stable instead of just rendering https://raw.githubusercontent.com/denoland/deno/main/cli/dts/lib.deno.window.d.ts. We should similarly use the output of deno types --unstable for https://doc.deno.land/builtin/unstable. It's not entirely necessary once deno doc supports triple slash references, but we should do this with the website either way for synchronicity with releases.