fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files - #5134

Merged
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports
Sep 15, 2025
Merged

fix: restore InferStructuralSharing and handleHashScroll in published .d.ts files#5134
Sheraff merged 1 commit into
TanStack:mainfrom
vedant416:vedant/fix-published-exports

Conversation

@vedant416

@vedant416vedant416 commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Fixes#5116

Root Cause

In PR #4907, the TypeScript compiler option stripInternal was enabled in tsconfig.json, which causes TypeScript to remove any declarations marked with @internal from the published .d.ts files.

This resulted in TypeScript compilation errors for library users who have set the TypeScript compiler option skipLibCheck to false, because the following members were missing:

  • InferStructuralSharing type in react-router
  • handleHashScroll function in router-core > scrollRestoration

Fix

  • This PR replaces the @internal annotation with the @private annotation.

Summary by CodeRabbit

  • Documentation
    • Updated internal API annotations in routing packages to mark certain items as private, improving the accuracy of generated developer documentation.
    • No changes to public APIs, behavior, or performance.
    • No user-facing impact.

@coderabbitai

coderabbitaiBot commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation annotations were updated from @internal to @Private in two TypeScript files. No code, types, signatures, or control flow changed. The updates affect visibility in generated docs only and address missing published type metadata without altering runtime or type behavior.

Changes

Cohort / File(s)Summary
Docs visibility annotations
packages/react-router/src/typePrimitives.ts, packages/router-core/src/scroll-restoration.ts
Switched JSDoc tags from @internal to @Private above InferStructuralSharing<TOptions> and handleHashScroll; no functional or type-signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks (4 passed, 1 warning)

❌ Failed checks (1 warning)
Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title Check✅ PassedThe title succinctly and accurately describes the primary change — restoring the missing InferStructuralSharing and handleHashScroll declarations in published .d.ts files — and directly reflects the modifications in the changeset without extraneous detail.
Linked Issues Check✅ PassedThe PR directly addresses issue #5116 by replacing @internal with @Private for InferStructuralSharing (react-router) and handleHashScroll (router-core), which preserves those declarations in published .d.ts files, and the raw_summary confirms only JSDoc visibility annotations changed with no signature or runtime modifications.
Out of Scope Changes Check✅ PassedNo out-of-scope changes were detected: both modified files only update JSDoc tags from @internal to @Private and the raw_summary indicates no other edits to signatures or behavior, which aligns with the PR objectives.

Poem

I thump my paw at docs so fine,
A subtle tag, a tidy line.
No scrolls unmoved, no types askew—
Just “private” signs to guide us through.
In clover fields of exports bright,
We publish what’s meant for sight.
Hop hop—ship it, crisp and light!

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"mode: "warning"instructions: | Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitaicoderabbitaiBot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/router-core/src/scroll-restoration.ts (1)

311-314: Throttle handler capture: avoid creating a new throttled function on each setup.

Minor: storing the throttled listener in a const avoids accidental multiple registrations with different closures if setupScrollRestoration is called again.

- if (typeof document !== 'undefined') {- document.addEventListener('scroll', throttle(onScroll, 100), true)- }+ if (typeof document !== 'undefined') {+ const onScrollThrottled = throttle(onScroll, 100)+ document.addEventListener('scroll', onScrollThrottled, true)+ // Consider returning a disposer to remove the listener on teardown.+ }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a600223 and b495d1a.

📒 Files selected for processing (2)
  • packages/react-router/src/typePrimitives.ts (1 hunks)
  • packages/router-core/src/scroll-restoration.ts (1 hunks)
🔇 Additional comments (4)
packages/router-core/src/scroll-restoration.ts (2)

349-355: Switching @internal@Private correctly prevents stripInternal from removing this export.

Good call—TypeScript only strips @internal, so @private preserves the declaration in published .d.ts files without changing runtime behavior.


361-364: No change needed — router.state.location.hash is already normalized (no leading '#')

router.parseLocation normalizes HistoryLocation.hash with hash.split('#').reverse()[0] (packages/router-core/src/router.ts), and restoreScroll already strips window.location.hash; handleHashScroll uses the parsed location.hash (no leading '#'), so the suggested change is unnecessary.

Likely an incorrect or invalid review comment.

packages/react-router/src/typePrimitives.ts (2)

34-36: @internal@Private restores InferStructuralSharing in published .d.ts.

This aligns with stripInternal: true while keeping the type available to consumers. No API or type changes—LGTM.


34-41: Add CI guard to ensure exported types are present in published .d.ts

Fail CI if key exports are missing after pnpm -w build. Location: packages/react-router/src/typePrimitives.ts (lines 34–41).

#!/bin/bashset -euo pipefail
pnpm -w build
# ensure .d.ts files existif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -print -quit | grep -q .;thenecho"No .d.ts files found after build"exit 1
fi# verify exported symbols are present in built d.tsif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*InferStructuralSharing" {} + >/dev/null 2>&1;thenecho"InferStructuralSharing missing in published d.ts"exit 1
fiif! find . -type f -name '*.d.ts' -not -path './node_modules/*' -exec grep -En "export[^;]*handleHashScroll" {} + >/dev/null 2>&1;thenecho"handleHashScroll missing in published d.ts"exit 1
fi# catch accidental @internal annotations in sourceif find packages/router-core/src packages/react-router/src -type f -exec grep -En '@internal' {} + >/dev/null 2>&1;thenecho"Found @internal in source; ensure stripInternal is enabled for the build"exit 1
fi

@nx-cloud

nx-cloudBot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit b495d1a

CommandStatusDurationResult
nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded5m 10sView ↗
nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 34sView ↗

☁️ Nx Cloud last updated this comment at 2025-09-15 10:43:16 UTC

@pkg-pr-new

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5134

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5134

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5134

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5134

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5134

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5134

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5134

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5134

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5134

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@5134

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5134

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5134

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5134

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5134

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5134

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5134

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5134

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5134

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5134

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5134

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5134

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5134

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5134

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5134

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5134

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@5134

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5134

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5134

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5134

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5134

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@5134

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@5134

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@5134

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5134

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5134

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5134

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5134

commit: b495d1a

@Sheraff

Copy link
Copy Markdown
Collaborator

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff
Sheraff merged commit bfc466f into TanStack:mainSep 15, 2025
6 checks passed
@vedant416

Copy link
Copy Markdown
ContributorAuthor

@vedant416 out of curiosity, what is your use-case for skipLibCheck: false?

@Sheraff the original reporter of issue #5116, @perbergland, might be able to share more about their use case.
For reference, the skipLibCheck: false is default compiler option (see TS docs), so I think it was a good catch by @perbergland.

Sign up for freeto 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.

InferStructuralSharing missing in published types (esm/cjs)

2 participants

@vedant416@Sheraff