Skip to content
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

Merged
merged 28 commits into from
Mar 10, 2025

Conversation

LekoArts
Copy link
Member

@LekoArts LekoArts commented Mar 7, 2025

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.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Mar 7, 2025

🦋 Changeset detected

Latest commit: 6fb1a87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
@clerk/shared Patch
@clerk/clerk-react Patch
@clerk/types Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/clerk-expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/remix Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/vue Patch
@clerk/localizations Patch
@clerk/themes Patch

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

Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 10, 2025 9:55am

Fetcher extends (...args: any[]) => Promise<any> | undefined,
Options extends UseReverificationOptions,
>(fetcher: Fetcher, options?: Options): UseReverificationResult<Fetcher, Options> {
export const useReverification: UseReverification = (fetcher, options) => {
Copy link
Member Author

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'
Copy link
Member Author

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?: {
Copy link
Member Author

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

Copy link
Member Author

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

@LekoArts LekoArts marked this pull request as ready for review March 7, 2025 10:59
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).
Copy link
Member

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>
@LekoArts LekoArts merged commit 7587967 into main Mar 10, 2025
30 checks passed
@LekoArts LekoArts deleted the typedoc-markdown-refinements branch March 10, 2025 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants