You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RouteMatch['__beforeLoadContext'] is tagged @internal. Since #4907 ("refactor(router-core): strip internal types from public build", 2025-08-10) enabled stripInternal repo-wide, that field has been removed from the published .d.ts — but this indexed-access reference to it was never updated, so it's been a dangling reference in every published .d.ts since router-core@1.171.16 (2026-08-04). #6118 later moved the interface to its current file unchanged, carrying the bug forward.
It went unnoticed by plain SPA consumers because nothing in the always-imported client path pulled ssr/types.ts into their type graph — until #7805's load-client.ts rewrite (also 2026-08-04) started importing TsrSsrGlobal from ./ssr/types.
Observe that tsc fails on router-core's own shipped types:
node_modules/@tanstack/router-core/dist/esm/ssr/types.d.ts(5,24):
error TS2339: Property '__beforeLoadContext' does not exist on type 'MakeRouteMatch'.
Expected behavior
tsc passes against a stock createRouter/createRootRoute setup with default compiler options.
Screenshots or Videos
No response
Platform
@tanstack/react-router: 1.170.32 (latest as of writing; bug present since 1.170.19 / router-core 1.171.16, 2026-08-04)
@tanstack/router-core: 1.171.27 (latest as of writing; broken since 1.171.16)
Mostly for completeness and correctness, I guess.
Someone who has thought more about this than me(the people creating Typescript) has set the skipLibCheck to false as a default, so I haven given it that much thought to be honest. 😅
Oh, and I probably should have mentioned this; I created the PR #8206 to fix it by inlining the type of RouteMatch['__beforeLoadContext']. Didn't think about the @internal annotation as a fix, but I thought about removing the field(which would be the same as @internal for external consumers?). I eventually decided against it to avoid breaking it for any consumers who is using it. But maybe this is internal stuff that consumers shouldn't be poking around anyways?
Activity
[-]router-core: ssr/types.d.ts references stripped @internal field, breaking tsc for skipLibCheck: false consumers[/-][+]router-core: ssr/types.d.ts references stripped @internal field, breaks tsc for consumers typechecking libs[/+]Sheraff commentedon Aug 31, 2026
Out of curiosity, why do you typecheck your dependencies?
oddsund commentedon Sep 1, 2026
Mostly for completeness and correctness, I guess.
Someone who has thought more about this than me(the people creating Typescript) has set the skipLibCheck to false as a default, so I haven given it that much thought to be honest. 😅
Oh, and I probably should have mentioned this; I created the PR #8206 to fix it by inlining the type of
RouteMatch['__beforeLoadContext']. Didn't think about the@internalannotation as a fix, but I thought about removing the field(which would be the same as@internalfor external consumers?). I eventually decided against it to avoid breaking it for any consumers who is using it. But maybe this is internal stuff that consumers shouldn't be poking around anyways?