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
{{ message }}
Repository navigation
DSL typing: name-less 3-arg path(pattern, component, childrenFn) collapses the route map to never #642
collapses the entire app's generated route map: Rango.Path resolves to never, producing cascading never type errors across every href/Link.to/named-route usage in the app — not just at the offending route.
Expected
Unnamed routes are deliberately excluded from the route map — ExtractRoutesFromItem maps TName extends UnnamedRoute to {} (src/urls/type-extraction.ts:85) — so a name-less route in any call form should contribute {} and leave sibling routes' types intact. The 2-arg form (path(pattern, component)) and the named 3-arg form both behave correctly.
Actual
With the name-less children-fn overload, the item's inferred type apparently falls through the TypedRouteItem conditional chain in ExtractRoutesFromItem (src/urls/type-extraction.ts:79), and the UnionToIntersection in ExtractRoutesFromItems (:127-135) absorbs the result into never for the whole tuple, wiping the map.
Workaround
Name the route: path("name", "/section/stream", StreamPage, () => [...]) — restores correct inference. (Matches repo conventions anyway, which is why this stayed latent.)
Hit while adding e2e routes for PPR shell caching (#641) in both tests/cloudflare-basic and e2e/test-app — reproduced identically in two independent apps, so it is the overload, not app-specific augmentation. Likely fix territory: the name-less children-fn overload's TypedRouteItem type parameters (or a defensive never-absorbing guard in ExtractRoutesFromItems so one bad item can never nuke the map — arguably worth doing regardless as a blast-radius fix).
Activity