docs(shared): Add typedoc comments; remove functions from generated property tables for /objects#8276
docs(shared): Add typedoc comments; remove functions from generated property tables for /objects#8276alexisintech wants to merge 19 commits intomainfrom
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This reverts commit 9100976.
…ct>-methods folder
…ne parameters with single properties
| */ | ||
| export const REFERENCE_OBJECT_PAGE_SYMBOLS = { | ||
| 'shared/clerk/clerk.mdx': 'Clerk', | ||
| 'shared/client-resource/client-resource.mdx': 'ClientResource', |
There was a problem hiding this comment.
| ['billing-namespace', '/docs/reference/objects/billing'], | ||
| ['client-resource', '/docs/reference/objects/client'], | ||
| ['redirect-options', '/docs/reference/types/redirect-options'], | ||
| ['handle-o-auth-callback-params', '/docs/reference/types/handle-o-auth-callback-params'], |
|
@alexisintech I have pushed a docs review with a few quick / straightforward fixes, but let me know if anything doesn't look right. It does the following:
Have found some other issues that I wasn't sure about but will make a separate comment for those. |
|
@alexisintech Okay here are the issues I have found while testing:
These are all spotted on the Clerk object page, but the Client object page looked quite good to me at first glance. The Clerk page was quite meaty to go through and test, so I may have missed some stuff but will give it a second look for peace of mind. |













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