Skip to content

Spec 013 T023: icon, facet-query and the Java parity spec, in TypeScript - #650

Merged
adamjohnwright merged 1 commit into
mainfrom
spec013/t023-content-4
Oct 24, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
spec013/t023-content-4

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 013, T023, batch 5 of the .mjs specs. Batch 4 was #649.

What changed. Three specs are converted: tools/content-node's icon and facet-query, and tools/java-parity's parity spec. They held 151 errors with checkJs on. Each is now a typed .ts spec, held at zero on both counts.

How:

  • The stand-in Solr in icon and facet-query is typed as in batch 4.
  • searchEntry's answer is a plain record, so its fields are read by name. Each such read was rewritten at exactly the position the compiler named, and nowhere else.
  • facet-query passes partial queries. Its tests give facetQueryParams queries with some lists left out. The endpoint always fills them, and the function reads an absent list as an empty one, so a typed helper says so rather than filling them in.
  • The parity spec's stub servers and their tables are typed, with the candidate's name as a constant of its own.
    • Reports are read through a helper that throws when there is no result.
    • The stub's early returns are explicit.

Checked:

  • The old .mjs versions and the new .ts ones each run the same 59 tests, all passing.
  • Types pass, and lint (1,329 warnings) and dead code (131) are unchanged.

🤖 Generated with Claude Code

Batch 5 of the .mjs specs: tools/content-node's icon and facet-query, and
tools/java-parity's parity spec -- 151 errors with checkJs on. Each is now a
.ts spec, typed and held at zero on both counts.

- The stand-in Solr in icon and facet-query typed as in batch 4.
- searchEntry's answer is a plain record, so its fields are read by name;
  each such read was rewritten at exactly the position the compiler named,
  and nowhere else.
- facet-query passes facetQueryParams queries with some lists left out. The
  endpoint always fills them, and the function reads an absent list as an
  empty one, so a typed helper says so rather than filling them in.
- The parity spec's stub servers and their tables are typed, the candidate's
  name a constant of its own; reports are read through a helper that
  throws when there is no result; the stub's early returns are explicit.

Same 59 tests as the .mjs versions, all passing; types, lint (1,329) and
dead code (131) unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit f3ee2de into main Oct 24, 2026
7 checks passed
@adamjohnwright
adamjohnwright deleted the spec013/t023-content-4 branch October 24, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant