-
Notifications
You must be signed in to change notification settings - Fork 324
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(shared,clerk-react,types): Improve JSDoc comments #5296
Conversation
🦋 Changeset detectedLatest commit: 6fb1a87 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Fetcher extends (...args: any[]) => Promise<any> | undefined, | ||
Options extends UseReverificationOptions, | ||
>(fetcher: Fetcher, options?: Options): UseReverificationResult<Fetcher, Options> { | ||
export const useReverification: UseReverification = (fetcher, options) => { |
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 moved the type definitions from inline into UseReverification
to make it easier to read
* | ||
* ```tsx {{ filename: 'src/Home.tsx' }} | ||
* import { useUser } from '@clerk/clerk-react' |
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 removal is on purpose, our docs will inject this at some point depending on which SDK you choose
longMessage?: string; | ||
/** | ||
* Additional information about the error. | ||
*/ | ||
meta?: { |
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'll document meta
at some point completely
scripts/tsconfig.json
Outdated
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.
These changes resolve some TS errors I had while browsing the files in the directory. Noticed that while creating the .typedoc/tsconfig.json
file
export type ClerkProviderProps = IsomorphicClerkOptions & { | ||
children: React.ReactNode; | ||
/** | ||
* Provide an initial state of the Clerk client during server-side rendering (SSR) | ||
* Provide an initial state of the Clerk client during server-side rendering. You don't need to set this value yourself unless you're [developing an SDK](https://clerk.com/docs/references/sdk/overview). |
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.
👍
Co-authored-by: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com>
Description
This is part of ECO-424 and largely changes/enhances/fixes JSDoc comments in the React SDK.
This PR also adds one Typedoc plugin for text replacement. So this continues what #5189 started. As a next step I'll open a PR to push the contents of the generation script to another repository.
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change