-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(repo): Add Typedoc #4925
chore(repo): Add Typedoc #4925
Conversation
🦋 Changeset detectedLatest commit: 441fb88 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review
@@ -0,0 +1,2 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't drastically improve the JSDoc comments so I've opted for no explicit release here. The future PRs will be more substantial for each individual SDK
@@ -121,8 +121,6 @@ type UseAuth = () => UseAuthReturn; | |||
* For projects using a server, you can have immediate access to this data during SSR. | |||
* | |||
* @example | |||
* A simple example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "A simple example" was removed because they'd otherwise would show up in the example code. We can already give context that it's an example without that sentence
@@ -40,7 +40,7 @@ export type SignedInAuthObject = { | |||
* Each item represents the minutes that have passed since the last time a first or second factor were verified. | |||
* [fistFactorAge, secondFactorAge] | |||
*/ | |||
factorVerificationAge: [number, number] | null; | |||
factorVerificationAge: [firstFactorAge: number, secondFactorAge: number] | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your IDE you'll get names shown instead of only number
* | ||
* @experimental This API is experimental and may change at any moment. | ||
* This API is experimental and may change at any moment. | ||
* @experimental |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag only "works" if it is on its own, so it shouldn't have any comment after it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL
Definitely enjoyed |
Eventually I want to add it (https://linear.app/clerk/issue/ECO-242/add-linting-to-validate-tsdoc-comments) but I think right now it would complain too much and get in the way, so I'll try to add it at the end. |
packages/astro/typedoc.json
Outdated
{ | ||
"$schema": "https://typedoc-plugin-markdown.org/schema.json", | ||
"entryPoints": ["./src/client/index.ts", "./src/types.ts"] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LekoArts I'm curious, why does this need to only exists for @clerk/astro
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On that branch I was working towards getting the Astro package in a finished state. But I'll do that in a separate PR now.
The purpose of the file itself was to define the entryPoints since you can't do that in the root file.
I removed it for now
Description
This PR adds Typedoc to the repository for this project: https://linear.app/clerk/project/auto-generate-api-docs-for-typescript-based-sdks-ddf6285ae589/overview
The PR does more than only adding Typedoc because I initially started this branch with the goal of already changing a bunch of SDKs at once. Since then I've decided to just do one PR per SDK but didn't want to split up the work already -- this PR also mostly contains smaller changes/whitespace changes anyways.
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change