docs(shared): Add typedoc comments; remove functions from generated property tables for /objects#8276
Draft
alexisintech wants to merge 17 commits intomainfrom
Draft
docs(shared): Add typedoc comments; remove functions from generated property tables for /objects#8276alexisintech wants to merge 17 commits intomainfrom
alexisintech wants to merge 17 commits intomainfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This reverts commit 9100976.
…ct>-methods folder
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.
Description
For the
/objectsin clerk-docs, we want to generate the reference information. In summary, this PR's main change is that:When typedoc goes to generate files, it creates a folder for each defined object (which we define in
reference-objects.mjs. E.g.clerkobject gets.typedoc/docs/shared/clerkfolder. This folder will have a<OBJECTNAME>-properties.mdxfile and a<OBJECTNAME>-methodsfolder that includes each of the methods.In a little more detail:
In
reference-objects.mjs, we define these objects by defining the Typedoc output paths and by defining the primary interface/class on each reference object page in order to resolve TypeDoc reflections.The
extract-methods.mjsscript will extract all of the methods from that object's primary interface/class and create a dedicated file for each one. I won't go into lengthy detail here, but the file is heavily commented through.In
custom-router.mjsREFERENCE_OBJECT_PAGE_SYMBOLS, dedicated folders are created for each object. Soclerk.mdxno longer gets added to.typedoc/docs/shared/, it gets added to its own folder:.typedoc/docs/shared/clerk/In
custom-plugin.mjsapplyRelativeLinkReplacements()helper that theextract-methods.mjsscript uses to incorporate the link replacements into the files it generatesapplyCatchAllMdReplacements()helper that theextract-methods.mjsscript uses to incorporate the catch-all replacements into the files it generatesstripReferenceObjectPropertiesSection()which removes the Properties section from a generated file and puts it into its own file. For example, ifshared/clerk/clerk.mdxis generated, it pulls the Properties section from it and puts it into its ownshared/clerk/clerk-properties.mdxfile.Notable additions:
See the following examples (with before on left, after on right):
joinWaitlist(), it accepts a params object of typeJoinWaitlistParams. Instead of a "Parameters" section, it has a "JoinWaitlistParams" section:Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change