Skip to content

docs(repo): Add typedoc comments; generate typedoc output for /objects docs#8276

Open
alexisintech wants to merge 93 commits into
mainfrom
aa/generate-object-docs
Open

docs(repo): Add typedoc comments; generate typedoc output for /objects docs#8276
alexisintech wants to merge 93 commits into
mainfrom
aa/generate-object-docs

Conversation

@alexisintech
Copy link
Copy Markdown
Member

@alexisintech alexisintech commented Apr 9, 2026

⚠️ In conjunction with Generate object reference docs

Description

For the /objects in clerk-docs, we want to generate the reference information. In summary, this PR's main change is that:
When typedoc goes to generate files, it creates a folder for each defined object (which we define in reference-objects.mjs. E.g. clerk object gets .typedoc/docs/shared/clerk folder. This folder will have a <OBJECTNAME>-properties.mdx file and a <OBJECTNAME>-methods folder that includes each of the methods.

In a little more detail:

In reference-objects.mjs, we define these objects by defining the Typedoc output paths and by defining the primary interface/class on each reference object page in order to resolve TypeDoc reflections.

The extract-methods.mjs script will extract all of the methods from that object's primary interface/class and create a dedicated file for each one. I won't go into lengthy detail here, but the file is heavily commented through.

In custom-router.mjs

  • Adds logic to ensure that for the defined REFERENCE_OBJECT_PAGE_SYMBOLS, dedicated folders are created for each object. So clerk.mdx no longer gets added to .typedoc/docs/shared/, it gets added to its own folder: .typedoc/docs/shared/clerk/

In custom-plugin.mjs

  • Updates all regex so that links are never added to headings (# - #######)
  • Adds applyRelativeLinkReplacements() helper that the extract-methods.mjs script uses to incorporate the link replacements into the files it generates
  • Adds applyCatchAllMdReplacements() helper that the extract-methods.mjs script uses to incorporate the catch-all replacements into the files it generates
  • Adds stripReferenceObjectPropertiesSection() which removes the Properties section from a generated file and puts it into its own file. For example, if shared/clerk/clerk.mdx is generated, it pulls the Properties section from it and puts it into its own shared/clerk/clerk-properties.mdx file.

comment-utils.mjs is used as a helper to remove "TODO" and its following text from generated content.

standalone-page-tag.mjs adds support for a custom tag called @standalonePage that can be used in conjunction with the @inline tag to indicate to typedoc to still generate a dedicated page for that type, even though it is recognized as @inline. Using both of these tags means that the type will show up as inlined in a table, but will also still have a generated MDX file.

Adds support for a custom tag @generateWithEmptyComment: self-documenting placeholder for declarations intentionally left without a description.

Notable additions:

  • Parameters that accept objects will include the object's properties in the table as children of that parameter.
    See the following examples (with before on left, after on right):
    Screenshot 2026-04-13 at 18 55 29
    Screenshot 2026-04-17 at 18 09 57
  • If a parameter links to a dedicated page, parameter children (a?.b, a?.c, a?.d) are not shown in the table.
    Screenshot 2026-04-17 at 18 11 16
  • If a method accepts only one parameter, the parameters section will be of that type. E.g. for joinWaitlist(), it accepts a params object of type JoinWaitlistParams. Instead of a "Parameters" section, it has a "JoinWaitlistParams" section:
    Screenshot 2026-04-13 at 18 59 45

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:

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 9, 2026

🦋 Changeset detected

Latest commit: 8172b62

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

This PR includes changesets to release 20 packages
Name Type
@clerk/backend Patch
@clerk/clerk-js Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/nextjs Patch
@clerk/react Patch
@clerk/shared Patch
@clerk/ui Patch
@clerk/vue Patch
@clerk/astro Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/chrome-extension Patch
@clerk/expo-passkeys Patch
@clerk/localizations Patch
@clerk/msw 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

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 28, 2026 11:18pm

Request Review

@alexisintech alexisintech changed the title Drop functions from property tables; add JSDoc comments docs(shared): Add/update typedoc comments; remove functions from generated property tables Apr 9, 2026
@alexisintech alexisintech changed the title docs(shared): Add/update typedoc comments; remove functions from generated property tables docs(shared): Add/update typedoc comments; remove functions from generated property tables for /objects Apr 10, 2026
@alexisintech alexisintech changed the title docs(shared): Add/update typedoc comments; remove functions from generated property tables for /objects docs(shared): Add typedoc comments; remove functions from generated property tables for /objects Apr 10, 2026
@alexisintech
Copy link
Copy Markdown
Member Author

unsafeMetadata section added successfully:

Screenshot 2026-05-27 at 15 04 12

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8276

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8276

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8276

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8276

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8276

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8276

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8276

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8276

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8276

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8276

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8276

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8276

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8276

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8276

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8276

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8276

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8276

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8276

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8276

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8276

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8276

commit: 8172b62

alexisintech and others added 4 commits May 27, 2026 15:12
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…orts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@manovotny
Copy link
Copy Markdown
Contributor

manovotny commented May 28, 2026

Pushed some changes directly in 9be16f7.

  • Broadened typedoc:generate cache inputs in turbo.json to .typedoc/**/*.mjs so edits to custom-plugin.mjs, custom-router.mjs, custom-theme.mjs, and prepare-markdown-renderer.mjs invalidate the cache.
  • Dropped the export on commentContainsTodo in .typedoc/comment-utils.mjs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@manovotny manovotny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good here, given the incoming changes in #8637 on top of this PR.

alexisintech and others added 6 commits May 28, 2026 13:11
…8637)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Novotny <manovotny@gmail.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Register a self-documenting modifier tag and strip it post-resolve so it's
indistinguishable from /** */ at render time. Migrate 102 empty doc-comments
across packages/shared/src/types/ to use the new tag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

API Changes Report

Generated by snapi on 2026-05-28T23:19:57.668Z

Summary

Metric Count
Packages analyzed 6
Packages with changes 1
🔴 Breaking changes 18
🟡 Non-breaking changes 2
🟢 Additions 4

Warning
18 breaking change(s) detected - Major version bump required

🤖 This report was reviewed by claude-sonnet-4-6.


@clerk/shared

Current version: 4.14.0
Recommended bump: MAJOR → 5.0.0

Subpath ./types

🔴 Breaking Changes (18)

Click to expand 18 changes
Changed: Clerk.__internal_attemptToEnableEnvironmentSetting
- __internal_attemptToEnableEnvironmentSetting: (options: __internal_AttemptToEnableEnvironmentSettingParams) => __internal_AttemptToEnableEnvironmentSettingResult;

Static analyzer: Removed property Clerk.__internal_attemptToEnableEnvironmentSetting

🤖 AI review (confirmed) (95%): The __internal_attemptToEnableEnvironmentSetting property was removed from the Clerk interface. Any consumer code referencing this property will fail to compile.

Migration: Remove any usage of clerk.__internal_attemptToEnableEnvironmentSetting from consumer code.

Changed: Clerk.__internal_closeCheckout
- __internal_closeCheckout: () => void;

Static analyzer: Removed property Clerk.__internal_closeCheckout

🤖 AI review (confirmed) (95%): The __internal_closeCheckout property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_closeCheckout from consumer code.

Changed: Clerk.__internal_closeEnableOrganizationsPrompt
- __internal_closeEnableOrganizationsPrompt: () => void;

Static analyzer: Removed property Clerk.__internal_closeEnableOrganizationsPrompt

🤖 AI review (confirmed) (95%): The __internal_closeEnableOrganizationsPrompt property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_closeEnableOrganizationsPrompt from consumer code.

Changed: Clerk.__internal_closePlanDetails
- __internal_closePlanDetails: () => void;

Static analyzer: Removed property Clerk.__internal_closePlanDetails

🤖 AI review (confirmed) (95%): The __internal_closePlanDetails property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_closePlanDetails from consumer code.

Changed: Clerk.__internal_closeReverification
- __internal_closeReverification: () => void;

Static analyzer: Removed property Clerk.__internal_closeReverification

🤖 AI review (confirmed) (95%): The __internal_closeReverification property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_closeReverification from consumer code.

Changed: Clerk.__internal_closeSubscriptionDetails
- __internal_closeSubscriptionDetails: () => void;

Static analyzer: Removed property Clerk.__internal_closeSubscriptionDetails

🤖 AI review (confirmed) (95%): The __internal_closeSubscriptionDetails property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_closeSubscriptionDetails from consumer code.

Changed: Clerk.__internal_country
- __internal_country?: string | null;

Static analyzer: Removed property Clerk.__internal_country

🤖 AI review (confirmed) (95%): The __internal_country property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_country from consumer code.

Changed: Clerk.__internal_mountOAuthConsent
- __internal_mountOAuthConsent: (targetNode: HTMLDivElement, oauthConsentProps?: __internal_OAuthConsentProps) => void;

Static analyzer: Removed property Clerk.__internal_mountOAuthConsent

🤖 AI review (confirmed) (95%): The __internal_mountOAuthConsent property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_mountOAuthConsent from consumer code.

Changed: Clerk.__internal_openCheckout
- __internal_openCheckout: (props?: __internal_CheckoutProps) => void;

Static analyzer: Removed property Clerk.__internal_openCheckout

🤖 AI review (confirmed) (95%): The __internal_openCheckout property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_openCheckout from consumer code.

Changed: Clerk.__internal_openEnableOrganizationsPrompt
- __internal_openEnableOrganizationsPrompt: (props: __internal_EnableOrganizationsPromptProps) => void;

Static analyzer: Removed property Clerk.__internal_openEnableOrganizationsPrompt

🤖 AI review (confirmed) (95%): The __internal_openEnableOrganizationsPrompt property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_openEnableOrganizationsPrompt from consumer code.

Changed: Clerk.__internal_openPlanDetails
- __internal_openPlanDetails: (props: __internal_PlanDetailsProps) => void;

Static analyzer: Removed property Clerk.__internal_openPlanDetails

🤖 AI review (confirmed) (95%): The __internal_openPlanDetails property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_openPlanDetails from consumer code.

Changed: Clerk.__internal_openReverification
- __internal_openReverification: (props?: __internal_UserVerificationModalProps) => void;

Static analyzer: Removed property Clerk.__internal_openReverification

🤖 AI review (confirmed) (95%): The __internal_openReverification property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_openReverification from consumer code.

Changed: Clerk.__internal_openSubscriptionDetails
- __internal_openSubscriptionDetails: (props?: __internal_SubscriptionDetailsProps) => void;

Static analyzer: Removed property Clerk.__internal_openSubscriptionDetails

🤖 AI review (confirmed) (95%): The __internal_openSubscriptionDetails property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_openSubscriptionDetails from consumer code.

Changed: Clerk.__internal_setActiveInProgress
- __internal_setActiveInProgress: boolean;

Static analyzer: Removed property Clerk.__internal_setActiveInProgress

🤖 AI review (confirmed) (95%): The __internal_setActiveInProgress property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_setActiveInProgress from consumer code.

Changed: Clerk.__internal_state
- __internal_state: State;

Static analyzer: Removed property Clerk.__internal_state

🤖 AI review (confirmed) (95%): The __internal_state property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_state from consumer code.

Changed: Clerk.__internal_unmountOAuthConsent
- __internal_unmountOAuthConsent: (targetNode: HTMLDivElement) => void;

Static analyzer: Removed property Clerk.__internal_unmountOAuthConsent

🤖 AI review (confirmed) (95%): The __internal_unmountOAuthConsent property was removed from the Clerk interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clerk.__internal_unmountOAuthConsent from consumer code.

Changed: ClientResource.__internal_sendCaptchaToken
- __internal_sendCaptchaToken: (params: unknown) => Promise<ClientResource>;

Static analyzer: Removed property ClientResource.__internal_sendCaptchaToken

🤖 AI review (confirmed) (95%): The __internal_sendCaptchaToken property was removed from the ClientResource interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clientResource.__internal_sendCaptchaToken from consumer code.

Changed: ClientResource.__internal_toSnapshot
- __internal_toSnapshot: () => ClientJSONSnapshot;

Static analyzer: Removed property ClientResource.__internal_toSnapshot

🤖 AI review (confirmed) (95%): The __internal_toSnapshot property was removed from the ClientResource interface. Consumer code accessing this property will no longer compile.

Migration: Remove any usage of clientResource.__internal_toSnapshot from consumer code.

🟡 Non-breaking Changes (2)

Modified: RemoveUserPasswordParams
- type RemoveUserPasswordParams = Pick<UpdateUserPasswordParams, 'currentPassword'>;
+ type RemoveUserPasswordParams = {
+   currentPassword?: string;
+ };

Static analyzer: Breaking change in type alias RemoveUserPasswordParams: Type changed: Pick<UpdateUserPasswordParams,'currentPassword'>{currentPassword?:string;}

🤖 AI review (reclassified as non-breaking) (90%): The resolved shape is structurally identical: both baseline (Pick<UpdateUserPasswordParams, 'currentPassword'>) and current ({ currentPassword?: string }) produce { currentPassword?: string }. No consumer code is affected since the structural type is unchanged.

Modified: SessionStatus
- type SessionStatus = 'abandoned' | 'active' | 'ended' | 'expired' | 'removed' | 'replaced' | 'revoked' | 'pending';
+ type SessionStatus =
+ /**
+  * The session was abandoned client-side.
+  */
+ 'abandoned'
+ /**
+  * The session is valid and all activity is allowed.
+  */ | 'active'
+ /**
+  * The user signed out of the session, but the [`Session`](https://clerk.com/docs/reference/objects/session) remains in the [`Client`](https://clerk.com/docs/reference/objects/client).
+  */ | 'ended'
+ /**
+  * The period of allowed activity for this session has passed.
+  */ | 'expired'
+ /**
+  * The user signed out of the session and the [`Session`](https://clerk.com/docs/reference/objects/session) was removed from the [`Client`](https://clerk.com/docs/reference/objects/client).
+  */ | 'removed'
+ /**
+  * The session has been replaced by another one, but the previous [`Session`](https://clerk.com/docs/reference/objects/session) remains in the [`Client`](https://clerk.com/docs/reference/objects/client).
+  */ | 'replaced'
+ /**
+  * The application ended the session and the [`Session`](https://clerk.com/docs/reference/objects/session) was removed from the [`Client`](https://clerk.com/docs/reference/objects/client).
+  */ | 'revoked'
+ /**
+  * The user has signed in but hasn't completed [session tasks](https://clerk.com/docs/guides/configure/session-tasks).
+  */ | 'pending';

Static analyzer: Breaking change in type alias SessionStatus: Type changed: 'abandoned'|'active'|'ended'|'expired'|'removed'|'replaced'|'revoked'|'pending''abandoned' /** * The session is valid and all activity is allowed. */|'active' /** * The user signed out of the sessio…

🤖 AI review (reclassified as non-breaking) (99%): The SessionStatus type members are identical in both versions — only JSDoc comments were added to each variant. The resolved union type is structurally unchanged.

🟢 Additions (4)

Added: ClerkOptionsNavigation
+ type ClerkOptionsNavigation = {
+   routerPush?: never;
+   routerReplace?: never;
+   routerDebug?: boolean;
+ } | {
+   routerPush: RouterFn;
+   routerReplace: RouterFn;
+   routerDebug?: boolean;
+ };

Added type alias ClerkOptionsNavigation

Added: OffEventListener
+ type OffEventListener = <E extends ClerkEvent>(event: E, handler: EventHandler<E>) => void;

Added type alias OffEventListener

Added: OnEventListener
+ type OnEventListener = <E extends ClerkEvent>(event: E, handler: EventHandler<E>, opt?: {
+   notify: boolean;
+ }) => void;

Added type alias OnEventListener

Added: WithOptionalOrgType
+ type WithOptionalOrgType<T$1> = T$1 & {
+   orgId?: string;
+ };

Added type alias WithOptionalOrgType


Report generated by snapi

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 9e81c42d-276c-4f89-89f9-67c294f95cde

📥 Commits

Reviewing files that changed from the base of the PR and between 35f8ac0 and 8172b62.

📒 Files selected for processing (1)
  • turbo.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • turbo.json

📝 Walkthrough

Walkthrough

Adds a TypeDoc generation pipeline and supporting utilities, plus broad JSDoc and a few type-export surface changes. New TypeDoc artifacts: plugins (custom-plugin, extract-methods), theme and router overrides, markdown helpers, slug/reference configs, and utilities (comment-utils, type-utils, standalone-page-tag). The extract plugin emits properties.mdx and methods/*.mdx for configured reference-object pages. Tests and frozen MDX snapshots were added; many package-level type files received expanded JSDoc and a small number of observable export changes (e.g., ClerkOptionsNavigation, WithOptionalOrgType, TelemetryCollector.recordLog, explicit RemoveUserPasswordParams shape).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (4)
packages/backend/src/api/endpoints/SessionApi.ts (1)

86-86: ⚡ Quick win

Add explicit return type to SessionAPI.getToken
packages/backend/src/api/endpoints/SessionApi.ts line 86 currently relies on inference for public async getToken(...). Adding : Promise<Token> would improve signature clarity (the resolved type is already effectively Promise<Token via return this.request<Token>(...)).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/backend/src/api/endpoints/SessionApi.ts` at line 86, Update the
async method signature for SessionApi.getToken to explicitly declare its return
type as Promise<Token> (i.e., change `public async getToken(sessionId: string,
template?: string, expiresInSeconds?: number)` to include `: Promise<Token>`),
and ensure the Token type is imported or available in the module so the `return
this.request<Token>(...)` remains type-consistent.
.typedoc/slug.mjs (2)

28-35: ⚡ Quick win

Add @returns JSDoc tag for completeness.

The function includes @param documentation but is missing the @returns tag. As per coding guidelines, public API functions should be documented with @param, @returns, @throws, and @example tags.

📝 Suggested JSDoc enhancement
 /**
  * Splits acronyms by also inserting a dash between adjacent uppercase letters when the second one is followed by a lowercase: `OKXWallet` → `okx-wallet`. Used for page URLs.
  *
  * `@param` {string} str
+ * `@returns` {string} The kebab-cased slug suitable for URLs.
  */
 export function toUrlSlug(str) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.typedoc/slug.mjs around lines 28 - 35, The toUrlSlug function is missing a
JSDoc `@returns` tag; update the JSDoc block above export function to include a
`@returns` description indicating it returns a lowercased URL-friendly slug string
(e.g., "returns {string} The input converted to a URL slug"), and keep the
existing `@param` line and any other tags required by the public API docs (add
`@throws/`@example only if applicable).

16-26: ⚡ Quick win

Add @returns JSDoc tag for completeness.

The function includes @param documentation but is missing the @returns tag. As per coding guidelines, public API functions should be documented with @param, @returns, @throws, and @example tags.

📝 Suggested JSDoc enhancement
 /**
  * Inserts a dash before every uppercase that immediately follows a lowercase or digit, then lowercases. Treats runs of uppercase letters (acronyms) as a single token: `OKXWallet` → `okxwallet`. Used for `methods/<slug>.mdx` filenames.
  *
  * `@param` {string} name
+ * `@returns` {string} The kebab-cased slug suitable for filenames.
  */
 export function toFileSlug(name) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.typedoc/slug.mjs around lines 16 - 26, The JSDoc for toFileSlug is missing
a `@returns` tag (and per guidelines also should include `@throws` and `@example` for
public APIs); update the comment above export function to add a `@returns`
describing that it returns a string (e.g., "The slugified filename string"),
optionally add a `@throws` line if the function can error (or explicitly state it
does not throw) and a brief `@example` showing usage of toFileSlug('OKXWallet') ->
'okxwallet'.
.typedoc/custom-theme.mjs (1)

1763-1774: ⚡ Quick win

Add @returns JSDoc tag to the exported function.

The exported isCallableInterfaceProperty function has @param documentation but is missing a @returns tag. While .mjs files don't require explicit return type annotations (per the TypeScript-specific guidelines), adding a @returns JSDoc tag for exported public APIs improves documentation clarity—especially important for a documentation-generation tooling file.

📚 Suggested improvement
 /**
  * `@param` {import('typedoc').DeclarationReflection} prop
  * `@param` {import('typedoc-plugin-markdown').MarkdownThemeContext['helpers']} helpers
+ * `@returns` {boolean} `true` if the property's type is callable (function type, union/intersection of callables, or reference to a callable type alias); `false` otherwise.
  */
 function isCallableInterfaceProperty(prop, helpers) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.typedoc/custom-theme.mjs around lines 1763 - 1774, The exported function
isCallableInterfaceProperty lacks a `@returns` JSDoc tag; add a `@returns` line to
its JSDoc block describing that it returns a boolean (e.g., "`@returns` {boolean}
whether the given DeclarationReflection represents a callable interface
property") so the public API docs include the return type and description.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.typedoc/__tests__/__snapshots__/clerk-properties.mdx:
- Line 14: The proxyUrl property description contains a sentence fragment;
update the text for `proxyUrl` so the fragment “Can be either a relative path
(...) or a full URL (...)” is rewritten as a full sentence (for example, start
with “It can be either…”), ensuring the description reads as two complete
sentences and preserves the examples and required-note wording.

In @.typedoc/__tests__/__snapshots__/user-resource-properties.mdx:
- Line 33: Update the generated description for the `unsafeMetadata` entry so
the compound adjective is hyphenated: change the phrase in the sentence that
references the `SignUp` object from "once the sign up is complete" to "once the
sign-up is complete". Locate the snapshot text for `unsafeMetadata` (the line
that mentions the `SignUp` object) and replace the unhyphenated "sign up" with
"sign-up" so the generated docs use the correct compound form.

In @.typedoc/__tests__/extract-methods.test.ts:
- Line 8: The comment header is inconsistent with the actual DOCS_DIR used by
the test; update the comment on line 8 to match the real DOCS_DIR constant used
in the test (referenced as DOCS_DIR in the file) so it correctly instructs to
run `pnpm typedoc:generate` and points to the same output directory the test
reads from (i.e., change “.typedoc/docs/” to whatever DOCS_DIR equals, or change
DOCS_DIR to match the comment).

In @.typedoc/comment-utils.mjs:
- Around line 31-50: stripTodoFromDisplayParts only checks p.kind === 'text' so
TODOs inside non-text display parts are not detected/removed; update
stripTodoFromDisplayParts to treat non-text parts as text for matching by
building a running string/offset map (or coerce each part to text via its text
property if present) and when TODO_WORD matches anywhere (regardless of
part.kind) truncate the output at that match: push any partial text before the
match as a final text part and stop processing further parts. Ensure you
reference the TODO_WORD and preserve other display-part objects unchanged up to
the truncation point in stripTodoFromDisplayParts so behavior matches
commentContainsTodo.

In
`@packages/expo/src/local-credentials/useLocalCredentials/useLocalCredentials.ts`:
- Around line 198-199: Update the public JSDoc comment that currently reads
"Indicates whether the stored credentials belong to the signed in uer." to
correct the typo by changing "uer" to "user" so the sentence reads "Indicates
whether the stored credentials belong to the signed in user."; locate the JSDoc
containing that exact phrase in useLocalCredentials.ts (the public API comment
above the related exported symbol) and make the single-word correction so
generated docs are accurate.

In `@packages/shared/src/types/client.ts`:
- Around line 27-33: The JSDoc says signUp/signIn can be null but the fields are
currently non-nullable; update the types to match the docs by changing the
signUp and signIn field types to be nullable (SignUpResource | null and
SignInResource | null) in the client type definition (fields signUp and signIn)
or alternatively update the JSDoc to remove “or `null`” if you intend them to be
non-nullable—pick one approach and keep JSDoc and the declared types for signUp
and signIn consistent.

In `@packages/shared/src/types/multiDomain.ts`:
- Around line 63-75: The type DomainOrProxyUrl currently allows both proxyUrl
and domain to be set despite the JSDoc and runtime behavior in buildScriptHost
which prefers proxyUrl over domain; update the public contract by encoding
mutual exclusivity: replace the single optional-object definition with a union
that enforces either { proxyUrl?: string | ((url: URL) => string); domain?:
never } or { domain?: string | ((url: URL) => string); proxyUrl?: never } and
also allow an empty case if we want neither set; update the JSDoc to match this
XOR semantics and reference proxyUrl/domain and buildScriptHost in the comment
so callers know precedence.

In `@packages/shared/src/types/telemetry.ts`:
- Around line 64-71: Update the duplicated JSDoc for the telemetry properties so
each describes its distinct purpose: change the comment for isEnabled to state
that when true telemetry collection/sending is enabled (otherwise disabled), and
change the comment for isDebug to state that when true telemetry is run in debug
mode (logs to console, includes verbose/debug details, and does not send events
to Clerk). Ensure you update the JSDoc blocks immediately above the isEnabled
and isDebug property declarations to reflect these distinct behaviors.

---

Nitpick comments:
In @.typedoc/custom-theme.mjs:
- Around line 1763-1774: The exported function isCallableInterfaceProperty lacks
a `@returns` JSDoc tag; add a `@returns` line to its JSDoc block describing that it
returns a boolean (e.g., "`@returns` {boolean} whether the given
DeclarationReflection represents a callable interface property") so the public
API docs include the return type and description.

In @.typedoc/slug.mjs:
- Around line 28-35: The toUrlSlug function is missing a JSDoc `@returns` tag;
update the JSDoc block above export function to include a `@returns` description
indicating it returns a lowercased URL-friendly slug string (e.g., "returns
{string} The input converted to a URL slug"), and keep the existing `@param` line
and any other tags required by the public API docs (add `@throws/`@example only if
applicable).
- Around line 16-26: The JSDoc for toFileSlug is missing a `@returns` tag (and per
guidelines also should include `@throws` and `@example` for public APIs); update the
comment above export function to add a `@returns` describing that it returns a
string (e.g., "The slugified filename string"), optionally add a `@throws` line if
the function can error (or explicitly state it does not throw) and a brief
`@example` showing usage of toFileSlug('OKXWallet') -> 'okxwallet'.

In `@packages/backend/src/api/endpoints/SessionApi.ts`:
- Line 86: Update the async method signature for SessionApi.getToken to
explicitly declare its return type as Promise<Token> (i.e., change `public async
getToken(sessionId: string, template?: string, expiresInSeconds?: number)` to
include `: Promise<Token>`), and ensure the Token type is imported or available
in the module so the `return this.request<Token>(...)` remains type-consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 41c47e90-ab01-4064-a1d8-ed4c96b3161a

📥 Commits

Reviewing files that changed from the base of the PR and between 37535f9 and 877fdf2.

📒 Files selected for processing (87)
  • .changeset/typedoc-objects-jsdoc.md
  • .prettierignore
  • .typedoc/__tests__/__snapshots__/api-key-resource-methods-create.mdx
  • .typedoc/__tests__/__snapshots__/clerk-methods-handle-email-link-verification.mdx
  • .typedoc/__tests__/__snapshots__/clerk-methods-handle-redirect-callback.mdx
  • .typedoc/__tests__/__snapshots__/clerk-methods-join-waitlist.mdx
  • .typedoc/__tests__/__snapshots__/clerk-methods-sign-out.mdx
  • .typedoc/__tests__/__snapshots__/clerk-properties.mdx
  • .typedoc/__tests__/__snapshots__/clerk.mdx
  • .typedoc/__tests__/__snapshots__/session-resource-methods-check-authorization.mdx
  • .typedoc/__tests__/__snapshots__/sign-in-future-resource-methods-email-code-send-code.mdx
  • .typedoc/__tests__/__snapshots__/sign-in-future-resource-methods-email-link.mdx
  • .typedoc/__tests__/__snapshots__/user-resource-properties.mdx
  • .typedoc/__tests__/extract-methods.test.ts
  • .typedoc/__tests__/file-structure.test.ts
  • .typedoc/comment-utils.mjs
  • .typedoc/custom-plugin.mjs
  • .typedoc/custom-router.mjs
  • .typedoc/custom-theme.mjs
  • .typedoc/extract-methods.mjs
  • .typedoc/markdown-helpers.mjs
  • .typedoc/reference-objects.mjs
  • .typedoc/slug.mjs
  • .typedoc/standalone-page-tag.mjs
  • .typedoc/type-utils.mjs
  • packages/backend/src/api/endpoints/ActorTokenApi.ts
  • packages/backend/src/api/endpoints/SessionApi.ts
  • packages/backend/src/api/resources/APIKey.ts
  • packages/backend/src/tokens/authObjects.ts
  • packages/backend/src/tokens/authenticateContext.ts
  • packages/clerk-js/src/core/modules/apiKeys/index.ts
  • packages/clerk-js/src/core/modules/debug/index.ts
  • packages/clerk-js/src/core/resources/Client.ts
  • packages/expo/src/google-one-tap/types.ts
  • packages/expo/src/local-credentials/useLocalCredentials/useLocalCredentials.ts
  • packages/express/src/getAuth.ts
  • packages/nextjs/src/app-router/server/currentUser.ts
  • packages/nextjs/src/server/createGetAuth.ts
  • packages/react/src/components/uiComponents.tsx
  • packages/react/src/hooks/useAuth.ts
  • packages/react/src/types.ts
  • packages/shared/src/eventBus.ts
  • packages/shared/src/react/billing/payment-element.tsx
  • packages/shared/src/react/hooks/createBillingPaginatedHook.tsx
  • packages/shared/src/react/hooks/useOrganization.tsx
  • packages/shared/src/react/hooks/useOrganizationCreationDefaults.types.ts
  • packages/shared/src/react/hooks/useOrganizationList.tsx
  • packages/shared/src/react/hooks/usePaymentAttemptQuery.types.ts
  • packages/shared/src/react/hooks/usePlanDetailsQuery.types.ts
  • packages/shared/src/react/hooks/useStatementQuery.types.ts
  • packages/shared/src/react/hooks/useSubscription.types.ts
  • packages/shared/src/react/types.ts
  • packages/shared/src/types/apiKeys.ts
  • packages/shared/src/types/attributes.ts
  • packages/shared/src/types/billing.ts
  • packages/shared/src/types/clerk.ts
  • packages/shared/src/types/client.ts
  • packages/shared/src/types/factors.ts
  • packages/shared/src/types/hooks.ts
  • packages/shared/src/types/identifiers.ts
  • packages/shared/src/types/image.ts
  • packages/shared/src/types/instance.ts
  • packages/shared/src/types/jwtv2.ts
  • packages/shared/src/types/multiDomain.ts
  • packages/shared/src/types/oauth.ts
  • packages/shared/src/types/organization.ts
  • packages/shared/src/types/organizationDomain.ts
  • packages/shared/src/types/organizationInvitation.ts
  • packages/shared/src/types/phoneCodeChannel.ts
  • packages/shared/src/types/redirects.ts
  • packages/shared/src/types/resource.ts
  • packages/shared/src/types/session.ts
  • packages/shared/src/types/signInFuture.ts
  • packages/shared/src/types/signUpCommon.ts
  • packages/shared/src/types/signUpFuture.ts
  • packages/shared/src/types/strategies.ts
  • packages/shared/src/types/telemetry.ts
  • packages/shared/src/types/user.ts
  • packages/shared/src/types/waitlist.ts
  • packages/shared/src/types/web3.ts
  • packages/ui/src/internal/appearance.ts
  • packages/ui/src/styledSystem/StyleCacheProvider.tsx
  • packages/vue/src/plugin.ts
  • scripts/renovate-config-generator.mjs
  • tsconfig.typedoc.json
  • turbo.json
  • typedoc.config.mjs
💤 Files with no reviewable changes (1)
  • packages/clerk-js/src/core/resources/Client.ts

Comment thread .typedoc/__tests__/__snapshots__/clerk-properties.mdx
Comment thread .typedoc/__tests__/__snapshots__/user-resource-properties.mdx Outdated
/**
* Snapshots for `extract-methods.mjs` output. Each `.mdx` under `__snapshots__/` is a frozen copy of a representative file produced by `typedoc:generate`. Refactors to the plugin or its helpers should leave these files byte-identical; a diff means the change is observable in the published docs and needs a human decision.
*
* Run `pnpm typedoc:generate` first to populate `.typedoc/docs/`, then `vitest run` here.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix path inconsistency in setup instructions.

Line 8 says generated files are under .typedoc/docs/, but the test reads from docs (Line 25). Please align the comment with the actual DOCS_DIR path to avoid confusion while running snapshots.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.typedoc/__tests__/extract-methods.test.ts at line 8, The comment header is
inconsistent with the actual DOCS_DIR used by the test; update the comment on
line 8 to match the real DOCS_DIR constant used in the test (referenced as
DOCS_DIR in the file) so it correctly instructs to run `pnpm typedoc:generate`
and points to the same output directory the test reads from (i.e., change
“.typedoc/docs/” to whatever DOCS_DIR equals, or change DOCS_DIR to match the
comment).

Comment thread .typedoc/comment-utils.mjs
Comment thread packages/expo/src/local-credentials/useLocalCredentials/useLocalCredentials.ts Outdated
Comment thread packages/shared/src/types/client.ts Outdated
Comment thread packages/shared/src/types/multiDomain.ts
Comment thread packages/shared/src/types/telemetry.ts
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

@alexisintech
Copy link
Copy Markdown
Member Author

@jacekradko hey hey, got some scary warnings here from snapi but here's what my agent is telling me:

this is a false positive caused by a recent snapi version bump on main, not anything in your PR.

Evidence:
- All 19 "removed" properties have an @internal JSDoc tag (verified locally)
- Your branch's source has them all (no removal in git diff main...HEAD)
- Your local build emits all 86 __internal_* symbols in dist/types/index.d.ts
- The snapi tool was bumped multiple times in the last 24h on main:
  - a3740fca3c snapi bump + cache changes (yesterday)
  - 17925fee39 enabled snapi AI reviewer
  - e42b48eceb, 5283c8cb90, d679eb1e2b further bumps
  - be63baad54 extended coverage to all SDK packages

The most likely cause: the new snapi version strips @internal-tagged symbols from the analyzed API, but the cached baseline (from before the bump) still includes them. Result: every @internal symbol appears as "removed" in any PR opened during this window.

just wanna make sure i'm okay 😨

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

Previously outputs were `.typedoc/**`, which caused turbo to capture and
later restore `__tests__/__snapshots__/` files over committed updates,
making snapshot edits invisible to CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

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.

3 participants