# Reference

Reference describes what each public export does, for a reader who already understands the library. It is written by hand, as native pages of the docs site: it cross-links freely and takes whatever shape serves the reader. It is never generated from doc comments.

## Entries

Each public export has exactly one **entry**: a heading whose anchor is the export's name. An entry holds:

1. **The signature**, as a checked code block (see [`examples.md`](examples.md)). When the signature changes, the build fails until the entry is updated.
2. **What it does**: parameters, the return value, and the errors it raises.
3. **Links to Learn**: at least one, to the concept behind the export.

An entry describes. The why and the teaching live in Learn, behind a link.

Things with no export (configuration files, CLI flags, environment variables) get hand-written entries too. Each needs a coverage check against the place its options are defined.

## The coverage check

The check runs both ways:

- It lists the package's public exports from its entry points, with the language's own tooling (the compiler, a module graph). Every export with no entry fails.
- It lists every entry. Every entry whose name is not a public export fails, so a rename or a deletion cannot leave a stale entry.

"Public" means what the package exposes to its users, not every symbol in the source. The check reads the code's exports, never its comments.

---

### MIT license

```text
MIT License

Copyright (c) 2026 Matt Pocock

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```