docs(core): document combinators via the guide instead of a split method type#67
Merged
Conversation
…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>
There was a problem hiding this comment.
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
ResultMethodsand removeAsyncResultMethods; inline the async method surface back ontoAsyncResult. - Update
Result/AsyncResultAPI 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 |
Collaborator
Author
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>
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.
Follow-up to #66 (already merged).
Context
#66 tried to make
flatMap(and the other combinators) discoverable in the generated API reference by exposingResultMethods+ a newAsyncResultMethodsas public types. ButResult/AsyncResultare 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 (ResultMethodsandAsyncResultMethods), 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.
ResultMethodsgoes back to@internal+intentionallyNotExported;AsyncResult's methods are inline again (noAsyncResultMethods). No standalone method type in the public surface.Result/AsyncResulttype docs now link to the intent-organized Choosing a combinator guide, which already documents both in one shared table.categoryOrderreordering and the "Why this matters more with AI in the loop" guide section from docs(core): surface the fluent combinators in the API reference via the guide #66 are unchanged.minor→patch(the only net effect vs. docs(core): surface the fluent combinators in the API reference via the guide #66 is removing the two type exports it added).Verification
All gates green:
format --check,lint,typecheck,knip,test,build.build:docsis warning-free and the VitePress site builds cleanly (the API→guide dead-link check passes).🤖 Generated with Claude Code