Skip to content

docs(core): document combinators via the guide instead of a split method type#67

Merged
btravers merged 2 commits into
mainfrom
docs/link-combinators-guide
Jul 6, 2026
Merged

docs(core): document combinators via the guide instead of a split method type#67
btravers merged 2 commits into
mainfrom
docs/link-combinators-guide

Conversation

@btravers

@btravers btravers commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #66 (already merged).

Context

#66 tried to make flatMap (and the other combinators) discoverable in the generated API reference by exposing ResultMethods + a new AsyncResultMethods as public types. But Result / AsyncResult are discriminated-union aliases, and TypeDoc can't hang a method list off a union — so that approach split the surface into two near-identical method blocks (ResultMethods and AsyncResultMethods), each a hop away from the type you actually landed on, when the mental model (and the guide) is that there's one shared surface.

This PR

Keep the method surface internal; point at the guide instead.

Verification

All gates green: format --check, lint, typecheck, knip, test, build. build:docs is warning-free and the VitePress site builds cleanly (the API→guide dead-link check passes).

🤖 Generated with Claude Code

…hod type

Follow-up to #66. That PR exposed ResultMethods + AsyncResultMethods as public
types so the combinators would render in the generated API reference — but since
Result/AsyncResult are discriminated-union aliases, TypeDoc can't hang a method
list off the type, so this split the surface into two near-duplicate method
blocks a hop away from the type you landed on.

Instead, keep the method surface internal and point at the guide:

- Revert the ResultMethods/AsyncResultMethods exports (ResultMethods back to
  @internal + intentionallyNotExported; AsyncResult's methods inline again).
- The Result/AsyncResult type docs link to the intent-organized "Choosing a
  combinator" guide, which already covers both in one shared table.

The categoryOrder reordering and the "AI in the loop" guide section from #66 are
unchanged. No runtime or public-type surface changes beyond removing the two
type exports #66 added; changeset downgraded minor -> patch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 6, 2026 18:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts how the Result / AsyncResult fluent combinator surface is presented in generated docs by removing standalone “method surface” types from the public API and instead linking consumers to the intent-organized guide.

Changes:

  • Stop exporting ResultMethods and remove AsyncResultMethods; inline the async method surface back onto AsyncResult.
  • Update Result / AsyncResult API docs to link to the “Choosing a combinator” guide.
  • Update TypeDoc config / internal docs and downgrade the changeset bump to patch.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/core/typedoc.json Adds ResultMethods to intentionallyNotExported to align TypeDoc output with the internalized method surface.
packages/core/src/types.ts Marks ResultMethods as @internal and inlines async combinators back into AsyncResult (removing AsyncResultMethods).
packages/core/src/index.ts Removes public type exports for ResultMethods and AsyncResultMethods.
packages/core/src/facade.ts Updates public API docs for Result / AsyncResult to point to the “Choosing a combinator” guide.
CLAUDE.md Updates contributor/internal documentation to reflect the new documentation approach and non-exported method surface.
.changeset/document-combinator-surface.md Updates release notes and bumps changeset from minor to patch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to +9
Improve the generated API reference so the fluent combinators are discoverable
(comment/config-only — no runtime or type changes). Because `Result` /
`AsyncResult` are discriminated-union aliases, TypeDoc can't list their methods
on the type page; rather than split the surface into a standalone method type,
the `Result` / `AsyncResult` docs now link to the intent-organized "Choosing a

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 62f9ddf. The changeset now states plainly that this removes the ResultMethods/AsyncResultMethods exports #66 added, and notes those exports were never released, so no published type surface changes and the patch bump stands.

Address Copilot review on #67: the changeset said "no type changes", but the
diff removes the ResultMethods / AsyncResultMethods exports #66 added. Reword to
state that plainly and note the exports were never released, so the published
type surface is unaffected (patch bump stands).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@btravers btravers merged commit 311d217 into main Jul 6, 2026
10 checks passed
@btravers btravers deleted the docs/link-combinators-guide branch July 6, 2026 18:10
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.

2 participants