Repository navigation
docs(site): add @memhtml/html to the API tier - #186
Closed
laithalsaadoon wants to merge 1 commit into
Closed
laithalsaadoon wants to merge 1 commit into
laithalsaadoon wants to merge 1 commit into
Conversation
Sixth slice of the generated reference: one more starlightTypeDoc instance writing api/html/ from the package's single import path, a package README that opens the generated page and maps every exported symbol to its module, a row in the tier index, and a sidebar group. Stacked on the document-shape interfaces (docs/html-doc-shapes), without which the page renders seven escaped braces. Measured on the branch: typedoc CLI exit 0 with zero warnings and zero brace hits, astro build exit 0, denylist scan of dist 0 files, a11y 33/33 and Lighthouse 5 URLs x 3 runs green with /api/html/ temporarily in the gate lists and then restored, mise run check 68/68.
Contributor
Author
|
Closed in favor of #264, which consolidates the four API-tier PRs (#185 html document shapes, #186 the |
This was referenced Oct 12, 2026
Closed
laithalsaadoon
added a commit
that referenced
this pull request
Oct 20, 2026
… @memhtml/html to it (#264) Three type-only edits under `packages/*/src` plus the `@memhtml/html` API page. No runtime line changes: the emitted JavaScript is identical. What changes: - `packages/html/src/document.ts`: the six document shapes (`MemoryMetas`, `MemoryLink`, `Facet`, `Citation`, `ArticleExtractions`, `MemoryDoc`) become interfaces that extend `typeof X.Type`, so the const and the interface merge under one name and every import site compiles unchanged. - `@memhtml/html` API page: a `starlightTypeDoc` instance writes `/api/html/` from the package's single import path; a new `packages/html/README.md` opens the page; the tier index gains a row and the sidebar a group. - `packages/index/src`: `type` exports for five interfaces that exported signatures already reference (`ArchivedMatch`, `EmbedMissingOptions`, `StoreChangedPath`, `StoreStatusEntry`, `StoreTreeEntry`); `IndexStateRow` becomes an interface the same way as the html shapes; six `{@link}`s to private names become code spans. Why: typedoc expands a `typeof X.Type` alias inline wherever a signature uses it, and typedoc-plugin-markdown prints an inline object literal inside a type argument as escaped `\{` prose, which `apps/docs/tests/figures.test.ts` rejects. The interfaces and named types render as links instead. Measured with the typedoc CLI: html went from 7 brace hits and 6 warnings to 0 and 0; index from 12 warnings and 1 hit (plus 13 hits from html's aliases) to 0 and 0. With these on main, the index API page (`/api/index/`) can follow as a docs-only slice. One caveat: an interface does not get the implicit index signature an object-literal type alias gets, so an out-of-tree consumer that assigned a `MemoryDoc` or an `IndexStateRow` to `Record<string, unknown>` would stop compiling. The workspace typecheck finds no such site. Consolidates #185, #186, #199 and #201, closed in favor of this branch. The `packages/sleep` part of the original branch no longer applies: 0.16.0 removed that package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sixth slice of the generated API reference:
@memhtml/htmljoins the tier at/api/html/. Documentation tooling and content only: one morestarlightTypeDocinstance inapps/docs/astro.config.tswritingapi/html/from the package's single import path, a newpackages/html/README.mdthat opens the generated page and maps every exported symbol to its module, a row in the tier index, and a sidebar group. No runtime, test or workflow file changes.Base is
docs/html-doc-shapes(#185): the page only renders brace-free once the six document shapes are interfaces. GitHub retargets this PR tomainwhen #185 merges.Measured on the branch
packages/html/src/index.ts: exit 0, 0 warnings, one page of 2746 lines, 0 escaped braces (7 hits and 6 unresolved{@link MemoryMetas.status}warnings onmain, see docs(html): name the six document shapes as interfaces so the API tier renders them #185).astro build: exit 0; brace probe over the builtapi/tree: 0 hits; denylist scan ofdist/: 0 files./api/html/temporarily added toAUDITED_PAGES; Lighthouse: 15 reports (5 URLs x 3 runs) all assertions passing;/api/html/performance/a11y/best-practices/SEO per run: 100/100/100/100, 99/100/100/100, 81/100/100/100 with/api/html/temporarily added tolighthouserc.json. Both gate files restored before commit; the diff carries neither.mise run check: exit 0, 68/68 tasks (on the third run; two earlier runs failed onlyapps/cli/tests/integrations.test.ts > integrations doctor > completes the live MCP handshakewithno initialize result within 5000 ms, which also passes and fails alone on the same tree with no file change, so it is load-sensitive and unrelated to this diff).Open question carried from #158
Whether
/api/<package>/pages should joinAUDITED_PAGESpermanently is still Laith's call; this PR proves the gates pass with the page in and leaves the lists as they were.