Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions runtime/reference/cli/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ function add(x: number, y: number): number
Adds x and y. @param {number} x @param {number} y @returns {number} Sum of x and y
```

### Documenting an npm or JSR package

Starting in Deno 2.8, `deno doc` accepts `npm:` and `jsr:` specifiers and will
fetch the package's published types before generating documentation. This is
useful for exploring a third-party API from the terminal without cloning the
repository:

```sh
deno doc npm:code-block-writer
deno doc jsr:@std/path
```

You can pin to a specific version like any other Deno specifier
(`npm:zod@4`), and combine the specifier with `--html` or `--json` to render
the same output formats as for local files.

## Linting

You can use `--lint` flag to check for problems in your documentation while it's
Expand Down