Skip to content

Spec 013 T023: eight more content-service specs, in TypeScript - #647

Merged
adamjohnwright merged 3 commits into
mainfrom
spec013/t023-content-2
Oct 24, 2026
Merged

adamjohnwright merged 3 commits into
mainfrom
spec013/t023-content-2

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Spec 013, T023, batch 3 of the .mjs specs. Batch 2 was #645.

What changed. Eight content-service specs are converted: pathways-low, complexes, overview-export, schema-objects, orthology, query-attribute-endpoint, interactors-static and referrers. They held 183 errors with checkJs on. Each is now a typed .ts spec, held at zero on both counts.

How they're typed, as batch 2's were:

  • Servers and stand-in graphs: typed with Server and AddressInfo. The graph's read takes a cypher string and its parameters, with the parameters the tests read by name declared.
  • JSON answers: each read as the shape Java writes.
  • Recorded queries: "the last query asked" and "the nth query asked" throw when there is none, as indexing into nothing threw before. None can pass on undefined.
  • Loops and requests: tuple loops are typed as const. A POST with no body still sends none.
  • Fixtures: typed from what they feed: orthologyMap's found objects as GraphNode, and the attribute endpoint's lazily loaded objects.

Checked:

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

🤖 Generated with Claude Code

adamjohnwright and others added 3 commits October 24, 2026 02:12
Batch 3 of the .mjs specs: pathways-low, complexes, overview-export,
schema-objects, orthology, query-attribute-endpoint, interactors-static
and referrers -- 183 errors with checkJs on. Each is now a .ts spec,
typed and held at zero on both counts, as batch 2's were:

- the servers and stand-in graphs typed as before (Server and
  AddressInfo; the graph's read taking a cypher string and its parameters,
  with the parameters the tests read by name declared);
- each JSON answer read as the shape Java writes;
- "the last query asked" and "the nth query asked" throw when there is
  none, as indexing into nothing threw before, so none can pass on
  undefined;
- tuple loops typed `as const`; body-less POSTs send no body, as before;
- fixtures typed from what they feed (orthologyMap's found objects as
  GraphNode, the lazily loaded objects of the attribute endpoint).

Same 103 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>
…he review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 37b1b4f into main Oct 24, 2026
7 checks passed
@adamjohnwright
adamjohnwright deleted the spec013/t023-content-2 branch October 24, 2026 02:51
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