docs(types): add TSDoc comments to public exports - #308
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
smalluban
force-pushed
the
docs-typings-tsdoc
branch
from
August 5, 2026 11:22
61c8832 to
de2e4d9
Compare
Closed
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.
The TypeScript declaration file only exposed the names and signatures of the public API, so editors showed no explanation when a user hovered over or autocompleted an export. Users had to leave the editor and look up the documentation site to understand what each export does.
This adds short TSDoc comments to every main export in
types/index.d.ts, each with a description,@param/@returnswhere useful, a small usage snippet for the most-used APIs, and a@seedeep link to the matching section on hybrids.js.org. The content is derived from the existing/docspages, so it stays consistent with the published documentation. No type signatures were changed.Covered exports:
Property,Descriptor(incl.value,connect,observe,reflect),UpdateFunction,RenderFunction,RenderDescriptor,ComponentBase,Component,HybridElementdefine,define.compile,define.from,mountparent,childrenStorageoptions, thestore()factory, and allstore.*methodsViewOptions, therouter()factory, and allrouter.*methodsMessages,localize,localize.languages,msg,msg.html,msg.svgdispatch,debugUpdateFunctionWithMethods,EventHandler,html,html.*,svgAdditionally,
types/index.d.tshad pre-existing Prettier violations. The file is now formatted, and./typeswas added to theformatnpm script so it stays covered going forward.