-
Couldn't load subscription status.
- Fork 403
chore(clerk-react): Improve JSDoc comments #5053
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(clerk-react): Improve JSDoc comments #5053
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 441254d The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
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 |
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.
Comments
| * ```tsx | ||
| * // app/page.tsx | ||
| * | ||
| * ```tsx {{ filename: 'app/page.tsx' }} |
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've changed my approach to indicate the filename to what we currently use in the docs. This won't show up in your IDE but we then can later use it in the docs.
| * | ||
| * ```tsx | ||
| * // pages/myServerSidePage.tsx | ||
| * ### Basic usage |
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.
Realized I can use headings, so switched them to what they'll be in the docs
|
|
||
| test('defaults to path routing and a path prop is required', () => { | ||
| const TestingComponent = props => { | ||
| const TestingComponent = (props: any) => { |
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.
Typedoc complained about type errors here, so I fixed those
| * ``` | ||
| * ``` |
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.
This empty code block is on purpose as without it the whole @example block would be interpreted as a code block. Only when you manually add a codeblock the text above is treated as such
| }; | ||
|
|
||
| authenticateWithOKXWallet = async (params: AuthenticateWithOKXWalletParams): Promise<void> => { | ||
| authenticateWithOKXWallet = async (params?: AuthenticateWithOKXWalletParams): Promise<void> => { |
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.
Typedoc complained about type errors here, so I fixed those. It's weird that it doesn't happen for other functions above that also have optional params
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.
Had to repeat all comments 😢
Description
Improve and add JSDoc comments to the public API of
@clerk/clerk-reactto document all client-side helpers (later with Typedoc). Since some of the hooks are in@clerk/sharedyou'll also see changes there.Some comments are duplicated and not DRY, unfortunately you can't add a comment to a type alias and use that instead. TypeScript doesn't support that 😢
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change