Repository navigation
fix(docs): returns and property headings the Mintlify pipeline got wrong - #344
Merged
Merged
Conversation
- A plain return no longer takes its field name from the word before "object", "instance" or "value" in its description, which named fields "the" and "an". - An interface method's Returns keeps its @returns text when its type expands into properties. About 40 app SDK methods and two platform ones had lost it. - Code spans in comments are no longer wrapped in a second pair of backticks, which also let a function's @returns text show twice. - A function-typed property under Properties gets a #### heading like its siblings, with its Parameters and Returns nested under it, and keeps a void return type. - Links to types deleted after processing are unlinked, whatever their text. - onAppCreated documents its app parameter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🚀 Package Preview Available! (
|
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/sdk@0.8.55-pr.344.26b3201Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.55-pr.344.26b3201"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/sdk@0.8.55-pr.344.26b3201"
}
}
Preview published to npm registry — try new features instantly! |
ronnyrin
approved these changes
Oct 21, 2026
…ry fix on real output Review: the fixes matched markdown text, and weren't all covered. - A property whose type is a function is found from the page's reflection, in the TypeDoc plugin, not from a "## Properties" section and literal Parameters and Returns headings in post-processing. Its whole subsection moves down with it, whatever its headings are called, and nothing changes for pages without such properties. - The dedupe of a Returns section's text ignores how lines wrap, and also covers a plain return whose description is the @returns sentence, which showed it twice. - The plain return's name is one constant. - file-processing.js runs only as a script, so tests can import its helpers. tests/unit/typedoc-mintlify.test.ts runs TypeDoc with the plugin on a fixture with one case per fix and checks the pages it writes. Undoing any one fix fails a test. Both references generate byte-identical to before. Co-Authored-By: Claude Opus 5.5 <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.
Fixes the generator problems found while reviewing the
@base44/platform/reactreference (base44-dev/mintlify-docs#2677), which were hand-patched there. Most of them also affected the app SDK reference.What changes in the output
App SDK
@returnssentence back, for exampleauth.me(): "Promise resolving to the user's profile data." It was dropped whenever the return type expanded into properties.InvokeLLMno longer has a return field namedan.Nothing else a reader sees changes. The generated files also differ in two ways that never reach the published pages:
AiGatewayConnectionis plain text. The README isn't published, sincecopy-to-local-docs.jsremoves it.``x``→`x`). Both forms render the same.Platform SDK
SecretsQuestion.submit()no longer has a return field namedthe.createApp(),openLiveSession()andsubscribe()get their@returnssentence back.onAppCreatedis a####property heading like its siblings, with#####Parameters and Returns under it. Its parameter has a description, and its return type isvoid.Causes
typedoc-mintlify-returns.js:/(\w+)\s+(?:instance|object|value)/. That almost always matched an article: "the values", "an object". Every plain return is nowresult, which already renders as the description alone.@returnssentence can reach a section more than once: as the section's own text, from the reflection, and as a plain return's description. The section now shows it once, comparing with whitespace normalized.renderCommentPartsandrenderCommentPart: TypeDoc'scodeparts already include their backticks. Wrapping them again produced``x``. That renders the same, but it stopped the dedupe above from matching, souseBase44Chat's@returnssentence showed twice.### name()), and post-processing then leaves them a level above their sibling properties. The plugin now finds these properties from the page's reflection (nameCallablePropertiesintypedoc-mintlify-content.js), drops the(), and moves the property's whole subsection down with it. It doesn't look for section names or heading text, and pages without such properties don't change.removeNonExposedTypeLinks: it only unlinked links whose text is the type name. It now also unlinks any link to a type intypes-to-delete-after-processing.json. Without this, the restored@returnssentence onai-gateway'sconnection()would link toAiGatewayConnection, a page that's deleted after processing.Not changed
Base44App), notPromise<Base44App>, as everywhere else.Testing
tests/unit/typedoc-mintlify.test.tsruns TypeDoc with the plugin on a small fixture (tests/unit/fixtures/typedoc-mintlify/) that has one case per fix, and checks the pages it writes. Undoing any one of the fixes fails at least one test.nameCallablePropertiesand the deleted-type unlinking. To make that possible,file-processing.jsnow runs only as a script, so tests can import it.vitest run tests/unitinpackages/sdk: 378 passed.test:typesanddocsinpackages/platformpass.🤖 Generated with Claude Code