diff --git a/.changeset/whole-wasps-know.md b/.changeset/whole-wasps-know.md new file mode 100644 index 00000000000..8eefc816e77 --- /dev/null +++ b/.changeset/whole-wasps-know.md @@ -0,0 +1,10 @@ +--- +'@clerk/backend': patch +'@clerk/nextjs': patch +'@clerk/shared': patch +'@clerk/clerk-react': patch +'@clerk/types': patch +'@clerk/vue': patch +--- + +Improve JSDoc comments diff --git a/.typedoc/__tests__/__snapshots__/file-structure.test.ts.snap b/.typedoc/__tests__/__snapshots__/file-structure.test.ts.snap index f252c5ca965..d4161c077bf 100644 --- a/.typedoc/__tests__/__snapshots__/file-structure.test.ts.snap +++ b/.typedoc/__tests__/__snapshots__/file-structure.test.ts.snap @@ -27,10 +27,16 @@ exports[`Typedoc output > should have a deliberate file structure 1`] = ` "types/localization-resource.mdx", "types/multi-domain-and-or-proxy.mdx", "types/organization-custom-role-key.mdx", + "types/organization-domain-resource.mdx", "types/organization-domain-verification-status.mdx", "types/organization-enrollment-mode.mdx", + "types/organization-invitation-resource.mdx", "types/organization-invitation-status.mdx", + "types/organization-membership-request-resource.mdx", + "types/organization-membership-resource.mdx", "types/organization-permission-key.mdx", + "types/organization-resource.mdx", + "types/organization-suggestion-resource.mdx", "types/organization-suggestion-status.mdx", "types/organizations-jwt-claim.mdx", "types/override.mdx", @@ -57,6 +63,7 @@ exports[`Typedoc output > should have a deliberate file structure 1`] = ` "types/use-sign-in-return.mdx", "types/use-sign-up-return.mdx", "types/use-user-return.mdx", + "types/user-organization-invitation-resource.mdx", "types/user-resource.mdx", "types/without.mdx", "shared/build-clerk-js-script-attributes.mdx", diff --git a/.typedoc/custom-plugin.mjs b/.typedoc/custom-plugin.mjs index 7ce9a30bc92..57343e9f2db 100644 --- a/.typedoc/custom-plugin.mjs +++ b/.typedoc/custom-plugin.mjs @@ -14,6 +14,7 @@ const FILES_WITHOUT_HEADINGS = [ 'paginated-hook-config.mdx', 'use-organization-list-return.mdx', 'use-organization-list-params.mdx', + 'create-organization-params.mdx', ]; /** @@ -28,6 +29,13 @@ const LINK_REPLACEMENTS = [ ['sign-up-resource', '/docs/references/javascript/sign-up'], ['user-resource', '/docs/references/javascript/user'], ['session-status-claim', '/docs/references/javascript/types/session-status'], + ['user-organization-invitation-resource', '/docs/references/javascript/types/organization-invitation'], + ['organization-membership-resource', '/docs/references/javascript/types/organization-membership'], + ['organization-suggestion-resource', '/docs/references/javascript/types/organization-suggestion'], + ['organization-resource', '/docs/references/javascript/organization'], + ['organization-domain-resource', '/docs/references/javascript/types/organization-domain'], + ['organization-invitation-resource', '/docs/references/javascript/types/organization-invitation'], + ['organization-membership-request-resource', '/docs/references/javascript/types/organization-membership-request'], ]; /** @@ -69,8 +77,8 @@ function getUnlinkedTypesReplacements() { replace: '[Clerk](/docs/references/javascript/clerk)', }, { - pattern: /`OrganizationCustomRoleKey`/g, - replace: '[OrganizationCustomRoleKey](/docs/references/javascript/types/organization-custom-role-key)', + pattern: /\(CreateOrganizationParams\)/g, + replace: '([CreateOrganizationParams](#create-organization-params))', }, ]; } diff --git a/.typedoc/custom-theme.mjs b/.typedoc/custom-theme.mjs index 88c25395f6b..6d8b2f77456 100644 --- a/.typedoc/custom-theme.mjs +++ b/.typedoc/custom-theme.mjs @@ -18,6 +18,17 @@ class ClerkMarkdownTheme extends MarkdownTheme { } } +/** + * This map stores the comment for the first item in a union type. + * It'll be used to add that comment to the other items of the union type. + * This way the comment only has to be added once. + * @type {Map} + * + * The key is a concenation of the model's type name and the union type's declaration name. + * The value is the comment + */ +const unionCommentMap = new Map(); + /** * Our custom Clerk theme * @extends MarkdownThemeContext @@ -88,6 +99,30 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { return output; }, + /** + * This ensures that everything is wrapped in a single codeblock + * @param {import('typedoc').DeclarationReflection} model + * @param {{ forceCollapse?: boolean }} [options] + */ + declarationType: (model, options) => { + const defaultOutput = superPartials.declarationType(model, options); + + // Ensure that the output starts with `\{ `. Some strings will do, some will have e.g. `\{` or `\{[]` + const withCorrectWhitespaceAtStart = defaultOutput.startsWith('\\{ ') + ? defaultOutput + : defaultOutput.startsWith('\\{') + ? defaultOutput.replace('\\{', '\\{ ') + : defaultOutput; + + const output = withCorrectWhitespaceAtStart + // Remove any backticks + .replace(/`/g, '') + // Remove any `` and `` tags + .replace(//g, '') + .replace(/<\/code>/g, ''); + + return `${output}`; + }, /** * This modifies the output of union types by wrapping everything in a single `foo | bar` tag instead of doing `foo` | `bar` * @param {import('typedoc').UnionType} model @@ -107,7 +142,7 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { return `${output}`; }, /** - * This ensures that everything is wrapped in a single codeblock (not individual ones) + * This ensures that everything is wrapped in a single codeblock * @param {import('typedoc').SignatureReflection[]} model * @param {{ forceParameterType?: boolean; typeSeparator?: string }} [options] */ @@ -132,7 +167,7 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { /** * Copied from original theme. * Changes: - * - Remove summaries over tables (TODO: Use elementSummaries instead) + * - Remove summaries over tables and instead use `@unionReturnHeadings` to add headings * - Only use one newline between items * https://github.com/typedoc2md/typedoc-plugin-markdown/blob/7032ebd3679aead224cf23bffd0f3fb98443d16e/packages/typedoc-plugin-markdown/src/theme/context/partials/member.typeDeclarationUnionContainer.ts * @param {import('typedoc').DeclarationReflection} model @@ -143,10 +178,51 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { * @type {string[]} */ const md = []; + /** + * @type {string[]} + */ + const headings = []; + /** + * Search for the `@unionReturnHeadings` tag in the comment of the model + */ + const unionReturnHeadings = model.comment?.getTag('@unionReturnHeadings'); + if (model.type instanceof UnionType) { const elementSummaries = model.type?.elementSummaries; model.type.types.forEach((type, i) => { if (type instanceof ReflectionType) { + if (unionReturnHeadings && unionReturnHeadings.content.length > 0) { + const content = this.helpers.getCommentParts(unionReturnHeadings.content); + const unionHeadings = JSON.parse(content); + + /** + * While iterating over the union types, the headings are pulled from `@unionReturnHeadings` and added to the array + */ + headings.push(unionHeadings[i]); + + /** + * The `model.type.types` is the array of the individual items of the union type. + * We're documenting our code by only adding the comment to the first item of the union type. + * + * In this block, we're doing the following: + * 1. Generate an ID for the item in the unionCommentMap + * 2. Check if the union type has a comment (truthy for the first item) + * 3. Add the comment to the map + * 4. If the union doesn't have a comment for the given ID, add the comment from the map to the item + */ + if (type.declaration.children) { + for (const decl of type.declaration.children) { + const id = `${model.name}-${decl.name}`; + + if (decl.comment && !unionCommentMap.has(id)) { + unionCommentMap.set(id, decl.comment); + } else if (!decl.comment && unionCommentMap.has(id)) { + decl.comment = unionCommentMap.get(id); + } + } + } + } + md.push(this.partials.typeDeclarationContainer(model, type.declaration, options)); } else { md.push(`${this.partials.someType(type)}`); @@ -156,7 +232,33 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { } }); } - return md.join('\n'); + + if (!unionReturnHeadings) { + return md.join('\n'); + } + + const items = headings.map(i => `'${i}'`).join(', '); + const tabs = md.map(i => `${i}`).join('\n'); + + return ` +${tabs} +`; + }, + /** + * This ensures that everything is wrapped in a single codeblock + * @param {import('typedoc').ArrayType} model + */ + arrayType: model => { + const defaultOutput = superPartials.arrayType(model); + + const output = defaultOutput + // Remove any backticks + .replace(/`/g, '') + // Remove any `` and `` tags + .replace(//g, '') + .replace(/<\/code>/g, ''); + + return `${output}`; }, }; } diff --git a/packages/backend/src/tokens/types.ts b/packages/backend/src/tokens/types.ts index 12da5acdeff..e4ed419c782 100644 --- a/packages/backend/src/tokens/types.ts +++ b/packages/backend/src/tokens/types.ts @@ -35,7 +35,7 @@ export type AuthenticateRequestOptions = { */ afterSignUpUrl?: string; /** - * Used to activate a specific [organization](https://clerk.com/docs/organizations/overview) or [personal account](https://clerk.com/docs/organizations/organization-workspaces#organization-workspaces-in-the-clerk-dashboard:~:text=Personal%20account) based on URL path parameters. If there's a mismatch between the active organization in the session (e.g., as reported by `auth()`) and the organization indicated by the URL, an attempt to activate the organization specified in the URL will be made. + * Used to activate a specific [organization](https://clerk.com/docs/organizations/overview) or [personal account](https://clerk.com/docs/organizations/organization-workspaces) based on URL path parameters. If there's a mismatch between the active organization in the session (e.g., as reported by `auth()`) and the organization indicated by the URL, an attempt to activate the organization specified in the URL will be made. * * If the activation can't be performed, either because an organization doesn't exist or the user lacks access, the active organization in the session won't be changed. Ultimately, it's the responsibility of the page to verify that the resources are appropriate to render given the URL and handle mismatches appropriately (e.g., by returning a 404). */ diff --git a/packages/backend/src/tokens/verify.ts b/packages/backend/src/tokens/verify.ts index 30b149e7b72..3a2b2d7d497 100644 --- a/packages/backend/src/tokens/verify.ts +++ b/packages/backend/src/tokens/verify.ts @@ -10,7 +10,7 @@ import { loadClerkJWKFromLocal, loadClerkJWKFromRemote } from './keys'; export type VerifyTokenOptions = Omit & Omit & { /** - * Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](https://clerk.com/docs/deployments/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](https://clerk.com/docs/backend-requests/handling/manual-jwt). + * Used to verify the session token in a networkless manner. Supply the PEM public key from the **[**API keys**](https://dashboard.clerk.com/last-active?path=api-keys) page -> Show JWT public key -> PEM Public Key** section in the Clerk Dashboard. **It's recommended to use [the environment variable](https://clerk.com/docs/deployments/clerk-environment-variables) instead.** For more information, refer to [Manual JWT verification](https://clerk.com/docs/backend-requests/manual-jwt). */ jwtKey?: string; }; diff --git a/packages/nextjs/src/app-router/server/currentUser.ts b/packages/nextjs/src/app-router/server/currentUser.ts index 11fc0ad9d11..84229b2661a 100644 --- a/packages/nextjs/src/app-router/server/currentUser.ts +++ b/packages/nextjs/src/app-router/server/currentUser.ts @@ -9,7 +9,7 @@ import { auth } from './auth'; * Under the hood, this helper: * - calls `fetch()`, so it is automatically deduped per request. * - uses the [`GET /v1/users/{user_id}`](https://clerk.com/docs/reference/backend-api/tag/Users#operation/GetUser) endpoint. - * - counts towards the [Backend API request rate limit](https://clerk.com/docs/backend-requests/resources/rate-limits#rate-limits). + * - counts towards the [Backend API request rate limit](https://clerk.com/docs/backend-requests/resources/rate-limits). * * @example * ```tsx {{ filename: 'app/page.tsx' }} diff --git a/packages/react/src/components/controlComponents.tsx b/packages/react/src/components/controlComponents.tsx index fdfc000af0f..9cf6536750b 100644 --- a/packages/react/src/components/controlComponents.tsx +++ b/packages/react/src/components/controlComponents.tsx @@ -170,7 +170,7 @@ export const RedirectToSignUp = withClerk(({ clerk, ...props }: WithClerkProp { React.useEffect(() => { @@ -183,7 +183,7 @@ export const RedirectToUserProfile = withClerk(({ clerk }) => { /** * @function - * @deprecated Use [`redirectToOrganizationProfile()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-organization-profile) instead, will be removed in the next major version. + * @deprecated Use [`redirectToOrganizationProfile()`](https://clerk.com/docs/references/javascript/clerk#redirect-to-organization-profile) instead, will be removed in the next major version. */ export const RedirectToOrganizationProfile = withClerk(({ clerk }) => { React.useEffect(() => { @@ -196,7 +196,7 @@ export const RedirectToOrganizationProfile = withClerk(({ clerk }) => { /** * @function - * @deprecated Use [`redirectToCreateOrganization()`](https://clerk.com/docs/references/javascript/clerk/redirect-methods#redirect-to-create-organization) instead, will be removed in the next major version. + * @deprecated Use [`redirectToCreateOrganization()`](https://clerk.com/docs/references/javascript/clerk#redirect-to-create-organization) instead, will be removed in the next major version. */ export const RedirectToCreateOrganization = withClerk(({ clerk }) => { React.useEffect(() => { diff --git a/packages/react/src/hooks/useAuth.ts b/packages/react/src/hooks/useAuth.ts index 9282175f2f3..d8b03ee89db 100644 --- a/packages/react/src/hooks/useAuth.ts +++ b/packages/react/src/hooks/useAuth.ts @@ -30,6 +30,9 @@ type UseAuthOptions = Nullish; * By default, Next.js opts all routes into static rendering. If you need to opt a route or routes into dynamic rendering because you need to access the authentication data at request time, you can create a boundary by passing the `dynamic` prop to ``. See the [guide on rendering modes](https://clerk.com/docs/references/nextjs/rendering-modes) for more information, including code examples. * * + * @unionReturnHeadings + * ["Initialization", "Signed out", "Signed in (no active organization)", "Signed in (with active organization)"] + * * @param [initialAuthStateOrOptions] - An object containing the initial authentication state. If not provided, the hook will attempt to derive the state from the context. * * @function diff --git a/packages/react/src/hooks/useSignIn.ts b/packages/react/src/hooks/useSignIn.ts index d9c76fb2115..e4f2fef6237 100644 --- a/packages/react/src/hooks/useSignIn.ts +++ b/packages/react/src/hooks/useSignIn.ts @@ -6,12 +6,15 @@ import { useIsomorphicClerkContext } from '../contexts/IsomorphicClerkContext'; import { useAssertWrappedByClerkProvider } from './useAssertWrappedByClerkProvider'; /** - * The `useSignIn()` hook provides access to the [`SignIn`](https://clerk.com/docs/references/javascript/sign-in/sign-in) object, which allows you to check the current state of a sign-in attempt and manage the sign-in flow. You can use this to create a [custom sign-in flow](https://clerk.com/docs/custom-flows/overview#sign-in-flow). + * The `useSignIn()` hook provides access to the [`SignIn`](https://clerk.com/docs/references/javascript/sign-in) object, which allows you to check the current state of a sign-in attempt and manage the sign-in flow. You can use this to create a [custom sign-in flow](https://clerk.com/docs/custom-flows/overview#sign-in-flow). + * + * @unionReturnHeadings + * ["Initialization", "Loaded"] * * @example * ### Check the current state of a sign-in * - * The following example uses the `useSignIn()` hook to access the [`SignIn`](https://clerk.com/docs/references/javascript/sign-in/sign-in) object, which contains the current sign-in attempt status and methods to create a new sign-in attempt. The `isLoaded` property is used to handle the loading state. + * The following example uses the `useSignIn()` hook to access the [`SignIn`](https://clerk.com/docs/references/javascript/sign-in) object, which contains the current sign-in attempt status and methods to create a new sign-in attempt. The `isLoaded` property is used to handle the loading state. * * * diff --git a/packages/react/src/hooks/useSignUp.ts b/packages/react/src/hooks/useSignUp.ts index b977c38e839..9bbb75e2315 100644 --- a/packages/react/src/hooks/useSignUp.ts +++ b/packages/react/src/hooks/useSignUp.ts @@ -6,12 +6,15 @@ import { useIsomorphicClerkContext } from '../contexts/IsomorphicClerkContext'; import { useAssertWrappedByClerkProvider } from './useAssertWrappedByClerkProvider'; /** - * The `useSignUp()` hook provides access to the [`SignUp`](https://clerk.com/docs/references/javascript/sign-up/sign-up) object, which allows you to check the current state of a sign-up attempt and manage the sign-up flow. You can use this to create a [custom sign-up flow](https://clerk.com/docs/custom-flows/overview#sign-up-flow). + * The `useSignUp()` hook provides access to the [`SignUp`](https://clerk.com/docs/references/javascript/sign-up) object, which allows you to check the current state of a sign-up attempt and manage the sign-up flow. You can use this to create a [custom sign-up flow](https://clerk.com/docs/custom-flows/overview#sign-up-flow). + * + * @unionReturnHeadings + * ["Initialization", "Loaded"] * * @example * ### Check the current state of a sign-up * - * The following example uses the `useSignUp()` hook to access the [`SignUp`](https://clerk.com/docs/references/javascript/sign-up/sign-up) object, which contains the current sign-up attempt status and methods to create a new sign-up attempt. The `isLoaded` property is used to handle the loading state. + * The following example uses the `useSignUp()` hook to access the [`SignUp`](https://clerk.com/docs/references/javascript/sign-up) object, which contains the current sign-up attempt status and methods to create a new sign-up attempt. The `isLoaded` property is used to handle the loading state. * * * diff --git a/packages/shared/src/react/hooks/useSession.ts b/packages/shared/src/react/hooks/useSession.ts index b2e019394c5..ec43aab2a76 100644 --- a/packages/shared/src/react/hooks/useSession.ts +++ b/packages/shared/src/react/hooks/useSession.ts @@ -8,6 +8,9 @@ type UseSession = (options?: PendingSessionOptions) => UseSessionReturn; /** * The `useSession()` hook provides access to the current user's [`Session`](https://clerk.com/docs/references/javascript/session) object, as well as helpers for setting the active session. * + * @unionReturnHeadings + * ["Initialization", "Signed out", "Signed in"] + * * @function * * @example diff --git a/packages/shared/src/react/hooks/useSessionList.ts b/packages/shared/src/react/hooks/useSessionList.ts index 047af2ecea3..ddf10ab0ad6 100644 --- a/packages/shared/src/react/hooks/useSessionList.ts +++ b/packages/shared/src/react/hooks/useSessionList.ts @@ -5,6 +5,9 @@ import { useAssertWrappedByClerkProvider, useClerkInstanceContext, useClientCont /** * The `useSessionList()` hook returns an array of [`Session`](https://clerk.com/docs/references/javascript/session) objects that have been registered on the client device. * + * @unionReturnHeadings + * ["Initialization", "Loaded"] + * * @function * * @example diff --git a/packages/shared/src/react/hooks/useUser.ts b/packages/shared/src/react/hooks/useUser.ts index 604cccf4cc1..990a34f7493 100644 --- a/packages/shared/src/react/hooks/useUser.ts +++ b/packages/shared/src/react/hooks/useUser.ts @@ -5,6 +5,9 @@ import { useAssertWrappedByClerkProvider, useUserContext } from '../contexts'; /** * The `useUser()` hook provides access to the current user's [`User`](https://clerk.com/docs/references/javascript/user) object, which contains all the data for a single user in your application and provides methods to manage their account. This hook also allows you to check if the user is signed in and if Clerk has loaded and initialized. * + * @unionReturnHeadings + * ["Initialization", "Signed out", "Signed in"] + * * @example * ### Get the current user * diff --git a/packages/types/src/clerk.ts b/packages/types/src/clerk.ts index b6164503ffe..207e3b14802 100644 --- a/packages/types/src/clerk.ts +++ b/packages/types/src/clerk.ts @@ -768,11 +768,11 @@ export type ClerkOptions = PendingSessionOptions & AfterSignOutUrl & AfterMultiSessionSingleSignOutUrl & { /** - * Optional object to style your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages. + * Optional object to style your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages. */ appearance?: Appearance; /** - * Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages. + * Optional object to localize your components. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages. */ localization?: LocalizationResource; polling?: boolean; @@ -785,7 +785,7 @@ export type ClerkOptions = PendingSessionOptions & */ standardBrowser?: boolean; /** - * Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/customization/account-portal/overview) pages. + * Optional support email for display in authentication screens. Will only affect [Clerk Components](https://clerk.com/docs/components/overview) and not [Account Portal](https://clerk.com/docs/account-portal/overview) pages. */ supportEmail?: string; /** @@ -1606,7 +1606,6 @@ export type CreateBulkOrganizationInvitationParams = { }; /** - * Parameters for the `createOrganization()` method. * @interface */ export interface CreateOrganizationParams { diff --git a/packages/types/src/hooks.ts b/packages/types/src/hooks.ts index 61f2d0a791e..4d2937a6d4a 100644 --- a/packages/types/src/hooks.ts +++ b/packages/types/src/hooks.ts @@ -25,9 +25,6 @@ type CheckAuthorizationWithoutOrgOrUser = (params: Parameters Promise; update: (updateParams: UpdateOrganizationMembershipParams) => Promise; + /** + * @internal + */ __internal_toSnapshot: () => OrganizationMembershipJSONSnapshot; } diff --git a/packages/types/src/organizationMembershipRequest.ts b/packages/types/src/organizationMembershipRequest.ts index 92d1a8d627b..99e72e53972 100644 --- a/packages/types/src/organizationMembershipRequest.ts +++ b/packages/types/src/organizationMembershipRequest.ts @@ -2,6 +2,10 @@ import type { OrganizationInvitationStatus } from './organizationInvitation'; import type { ClerkResource } from './resource'; import type { PublicUserData } from './session'; +/** + * The `OrganizationMembershipRequest` object is the model that describes the request of a user to join an organization. + * @interface + */ export interface OrganizationMembershipRequestResource extends ClerkResource { id: string; organizationId: string; diff --git a/packages/types/src/organizationSuggestion.ts b/packages/types/src/organizationSuggestion.ts index bfdf7814c21..1a4b7cd71b2 100644 --- a/packages/types/src/organizationSuggestion.ts +++ b/packages/types/src/organizationSuggestion.ts @@ -5,6 +5,10 @@ import type { ClerkResource } from './resource'; */ export type OrganizationSuggestionStatus = 'pending' | 'accepted'; +/** + * An interface representing an organization suggestion. + * @interface + */ export interface OrganizationSuggestionResource extends ClerkResource { id: string; publicOrganizationData: { diff --git a/packages/types/src/userOrganizationInvitation.ts b/packages/types/src/userOrganizationInvitation.ts index 3a5707bd1c1..feee4d49a78 100644 --- a/packages/types/src/userOrganizationInvitation.ts +++ b/packages/types/src/userOrganizationInvitation.ts @@ -17,6 +17,10 @@ declare global { } } +/** + * The `OrganizationInvitation` object is the model around an organization invitation. + * @interface + */ export interface UserOrganizationInvitationResource extends ClerkResource { id: string; emailAddress: string; diff --git a/packages/vue/src/composables/useSignIn.ts b/packages/vue/src/composables/useSignIn.ts index cb9172238f0..b0ae14ed503 100644 --- a/packages/vue/src/composables/useSignIn.ts +++ b/packages/vue/src/composables/useSignIn.ts @@ -9,7 +9,7 @@ import { useClerkContext } from './useClerkContext'; type UseSignIn = () => ToComputedRefs; /** - * Returns the current [`SignIn`](https://clerk.com/docs/references/javascript/sign-in/sign-in) object which provides + * Returns the current [`SignIn`](https://clerk.com/docs/references/javascript/sign-in) object which provides * methods and state for managing the sign-in flow. * * @example diff --git a/packages/vue/src/composables/useSignUp.ts b/packages/vue/src/composables/useSignUp.ts index 2be0ad8252e..6ac5f946a77 100644 --- a/packages/vue/src/composables/useSignUp.ts +++ b/packages/vue/src/composables/useSignUp.ts @@ -9,7 +9,7 @@ import { useClerkContext } from './useClerkContext'; type UseSignUp = () => ToComputedRefs; /** - * Returns the current [`SignUp`](https://clerk.com/docs/references/javascript/sign-up/sign-up) object which provides + * Returns the current [`SignUp`](https://clerk.com/docs/references/javascript/sign-up) object which provides * methods and state for managing the sign-up flow. * * @example diff --git a/typedoc.config.mjs b/typedoc.config.mjs index cbe273970ad..3b16212cc9e 100644 --- a/typedoc.config.mjs +++ b/typedoc.config.mjs @@ -3,6 +3,7 @@ import fs from 'node:fs'; import { OptionDefaults } from 'typedoc'; const IGNORE_LIST = ['.DS_Store', 'dev-cli', 'expo-passkeys', 'testing', 'themes', 'upgrade']; +const CUSTOM_TAGS = ['@unionReturnHeadings']; /** * Return an array of relative paths to all folders in the "packages" folder to be used for the "entryPoints" option. @@ -86,6 +87,7 @@ const config = { theme: 'clerkTheme', router: 'clerk-router', readme: 'none', + notRenderedTags: [...OptionDefaults.notRenderedTags, ...CUSTOM_TAGS], packageOptions: { includeVersion: false, excludePrivate: true, @@ -95,7 +97,7 @@ const config = { excludeInternal: true, excludeNotDocumented: true, gitRevision: 'main', - blockTags: [...OptionDefaults.blockTags], + blockTags: [...OptionDefaults.blockTags, ...CUSTOM_TAGS], modifierTags: [...OptionDefaults.modifierTags], exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx'], readme: 'none',