/**
 * Type-level tests for reverse type system
 *
 * These tests verify that the type system works correctly at compile time.
 * They use expectTypeOf() from vitest which performs compile-time type checking.
 */
import { describe, it, expectTypeOf } from "vitest";
describe("ExtractParams", () => {
    it("should extract simple params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract multiple params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should handle optional params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should handle constrained params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty object for no params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should handle mixed params", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("ParamsFor", () => {
    it("should extract params for route with params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty object for route without params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should handle optional params", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("PrefixRoutePatterns", () => {
    it("should prefix patterns", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should handle empty prefix", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should handle root pattern", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("PrefixRouteKeys", () => {
    it("should prefix keys", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should handle empty prefix", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("PrefixedRoutes", () => {
    it("should prefix both keys and patterns", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("ReverseFunction type structure", () => {
    it("should be a callable function type", () => {
        expectTypeOf().toBeCallableWith("about");
        expectTypeOf().toBeCallableWith("blog.post", { slug: "hello" });
    });
    it("should return string", () => {
        expectTypeOf().returns.toBeString();
    });
    it("should accept valid route names", () => {
        // These are valid route keys in TestRoutes
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
    });
});
describe("ScopedReverseFunction type structure", () => {
    it("should be a callable function type", () => {
        expectTypeOf().toBeCallableWith("index");
        expectTypeOf().toBeCallableWith("post", { slug: "hello" });
    });
    it("should return string", () => {
        expectTypeOf().returns.toBeString();
    });
    it("should reject unknown names", () => {
        // No escape hatches: dotted names and paths must be in the route map
        // @ts-expect-error - unknown dotted name
        expectTypeOf().toBeCallableWith("shop.cart");
        // @ts-expect-error - unknown path
        expectTypeOf().toBeCallableWith("/about");
    });
});
describe("HandlerContext.reverse", () => {
    it("should have reverse property that is a function", () => {
        expectTypeOf().toBeFunction();
    });
    it("should return string", () => {
        expectTypeOf().returns.toBeString();
    });
    it("should accept string as first argument", () => {
        expectTypeOf().toBeString();
    });
    it("should accept params as second argument", () => {
        expectTypeOf().toBeObject();
    });
});
import { urls } from "../urls.js";
import { isResponseError } from "../client.js";
// Actual urls definitions using the real urls() / path.json() API.
// This tests that response types propagate through the phantom type chain.
const rscPatterns = urls(({ path }) => [
    path("/", () => null, { name: "home" }),
    path("/about", () => null, { name: "about" }),
    path("/blog/:slug", () => null, { name: "blog.post" }),
]);
const apiPatterns = urls(({ path }) => [
    path.json("/health", () => ({ status: "ok", timestamp: Date.now() }), { name: "health" }),
    path.json("/items", () => [{ id: "1", name: "Widget" }], { name: "items" }),
    path.json("/items/:id", (ctx) => ({ id: ctx.params.id, name: "Widget", price: 9.99 }), { name: "item" }),
]);
// --- Scoped RouteResponse (from UrlPatterns._responses phantom) ---
describe("RouteResponse (scoped, from UrlPatterns)", () => {
    it("should resolve typed response envelope from path.json() patterns", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve array response envelope type", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve dynamic route response envelope type", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("PathResponse (full chain through routeMap)", () => {
    it("should resolve response envelope for static response route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response envelope for array response", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response envelope for dynamic response route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return ResponseEnvelope<never> for RSC routes (no response type)", () => {
        expectTypeOf().toEqualTypeOf();
        expectTypeOf().toEqualTypeOf();
    });
    it("should return ResponseEnvelope<never> for non-existent pattern", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("ParamsFor with response routes in routeMap", () => {
    it("should extract params from RSC route (string value)", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract params from response route ({ path, response } value)", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty params for static response route", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("ValidPaths with mixed routeMap", () => {
    it("should include paths from both RSC and response routes", () => {
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
    });
});
describe("ReverseFunction with mixed routeMap", () => {
    it("should accept RSC route names", () => {
        expectTypeOf().toBeCallableWith("about");
        expectTypeOf().toBeCallableWith("home");
    });
    it("should accept response route names with params", () => {
        expectTypeOf().toBeCallableWith("health");
        expectTypeOf().toBeCallableWith("item", { id: "123" });
    });
});
describe("ResponseHandlerContext", () => {
    it("should extract bindings from RouterEnv", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should fallback to empty object for non-RouterEnv", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should have searchParams", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should have url", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should have pathname", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should have typed params", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
// ============================================================================
// ResponseEnvelope — discriminated union shape
// ============================================================================
describe("ResponseEnvelope", () => {
    it("should have data branch with T and no error", () => {
        expectTypeOf().toEqualTypeOf();
        expectTypeOf().toHaveProperty("error");
    });
    it("should have error branch with ResponseError and no data", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should have message on ResponseError", () => {
        expectTypeOf().toHaveProperty("message");
        expectTypeOf().toBeString();
    });
    it("should have optional code and type on ResponseError", () => {
        expectTypeOf().toHaveProperty("code");
        expectTypeOf().toHaveProperty("type");
    });
});
// ============================================================================
// isResponseError — type narrowing
// ============================================================================
describe("isResponseError", () => {
    it("should narrow to error branch", () => {
        const result = {};
        if (isResponseError(result)) {
            expectTypeOf(result.error).toEqualTypeOf();
            // data should be undefined in the error branch
            expectTypeOf(result.data).toEqualTypeOf();
        }
        else {
            expectTypeOf(result.data).toEqualTypeOf();
        }
    });
    it("should accept ResponseEnvelope input", () => {
        expectTypeOf((isResponseError)).toBeCallableWith({});
    });
    it("should return boolean", () => {
        expectTypeOf((isResponseError)).returns.toBeBoolean();
    });
});
// ============================================================================
// User-land API: urls() with include(), mixed MIME types, scoped RouteResponse
// ============================================================================
// --- Sub-module patterns (each declared independently, like separate files) ---
// JSON API module (e.g. api/urls.tsx)
const userApiPatterns = urls(({ path }) => [
    path.json("/health", () => ({ status: "ok", uptime: 123 }), { name: "health" }),
    path.json("/users", () => [{ id: "1", email: "a@b.com" }], { name: "users" }),
    path.json("/users/:userId", (ctx) => ({ id: ctx.params.userId, email: "a@b.com" }), { name: "user" }),
    path.json("/users/:userId/posts/:postId", (ctx) => ({
        id: ctx.params.postId,
        author: ctx.params.userId,
        title: "Hello",
    }), { name: "user.post" }),
]);
// Text module (e.g. seo/urls.tsx)
const seoPatterns = urls(({ path }) => [
    path.text("/robots.txt", () => "User-agent: *\nDisallow: /api/", { name: "robots" }),
    path.text("/sitemap.txt", () => "https://example.com/\nhttps://example.com/about", { name: "sitemap" }),
]);
// Main urlpatterns — mixes RSC pages, inline response routes, and includes
// This mirrors what a real app's urls.tsx looks like
const mainPatterns = urls(({ path, include }) => [
    // RSC pages
    path("/", () => null, { name: "home" }),
    path("/about", () => null, { name: "about" }),
    path("/blog/:slug", () => null, { name: "blog.post" }),
    // Inline JSON route alongside RSC
    path.json("/api/inline", () => ({ inline: true, count: 42 }), { name: "inlineApi" }),
    // Inline text route
    path.text("/version.txt", () => "1.0.0", { name: "version" }),
    // Include JSON API module
    include("/api/v1", userApiPatterns, { name: "api" }),
    // Include text module
    include("/seo", seoPatterns, { name: "seo" }),
]);
// --- Scoped RouteResponse (local typing before include) ---
describe("RouteResponse (scoped, local typing)", () => {
    it("should resolve typed response from local JSON patterns", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve array response from local JSON patterns", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve parameterized response from local JSON patterns", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve deeply nested response from local JSON patterns", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve text patterns locally (text routes have string data)", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("urls() with include() — full type chain", () => {
    // RSC routes remain plain strings
    it("should have RSC routes as string values", () => {
        expectTypeOf().toBeString();
    });
    // Inline response routes become { path, response } objects
    it("should have inline JSON route as { path, response } object", () => {
        expectTypeOf().toMatchTypeOf();
    });
    // Route names: RSC
    it("should resolve RSC route names in ReverseFunction", () => {
        expectTypeOf().toBeCallableWith("home");
        expectTypeOf().toBeCallableWith("about");
        expectTypeOf().toBeCallableWith("blog.post", { slug: "hello" });
    });
    // Route names: inline response routes
    it("should resolve inline response route names", () => {
        expectTypeOf().toBeCallableWith("inlineApi");
        expectTypeOf().toBeCallableWith("version");
    });
    // Route names: included JSON API (prefixed with "api.")
    it("should resolve included JSON API route names with prefix", () => {
        expectTypeOf().toBeCallableWith("api.health");
        expectTypeOf().toBeCallableWith("api.users");
        expectTypeOf().toBeCallableWith("api.user", { userId: "123" });
        expectTypeOf().toBeCallableWith("api.user.post", { userId: "1", postId: "42" });
    });
    // Route names: included text routes (prefixed with "seo.")
    it("should resolve included text route names with prefix", () => {
        expectTypeOf().toBeCallableWith("seo.robots");
        expectTypeOf().toBeCallableWith("seo.sitemap");
    });
});
describe("PathResponse through urls() with include()", () => {
    // RSC routes
    it("should return ResponseEnvelope<never> for RSC routes", () => {
        expectTypeOf().toEqualTypeOf();
        expectTypeOf().toEqualTypeOf();
    });
    // Inline JSON route
    it("should resolve inline JSON route response", () => {
        expectTypeOf().toEqualTypeOf();
    });
    // Inline text route
    it("should resolve inline text route response as string", () => {
        expectTypeOf().toEqualTypeOf();
    });
    // Included JSON API routes (URL-prefixed with /api/v1)
    it("should resolve included JSON API route response", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve included JSON API array response", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve included JSON API parameterized response", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve included deeply nested route response", () => {
        expectTypeOf().toEqualTypeOf();
    });
    // Included text routes (URL-prefixed with /seo)
    it("should resolve included text route response", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("ParamsFor through urls() with include()", () => {
    it("should extract params from RSC route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract params from included API route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract multiple params from included nested route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty params for static included routes", () => {
        expectTypeOf().toEqualTypeOf();
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty params for inline response routes", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("ValidPaths through urls() with include()", () => {
    it("should include all route paths from mixed sources", () => {
        // RSC
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        // Inline response
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        // Included JSON API
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        // Included text
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
    });
});
// ============================================================================
// Mountable module: blog with RSC pages + JSON APIs, nested include, scoped href
// ============================================================================
// blog/api/urls.tsx — Blog's own JSON API routes
const blogApiPatterns = urls(({ path }) => [
    path.json("/stats", () => ({ views: 1000, visitors: 500 }), { name: "stats" }),
    path.json("/:slug/likes", (ctx) => ({ slug: ctx.params.slug, count: 42 }), { name: "likes" }),
    path.json("/:slug/comments", (ctx) => ([
        { id: "c1", slug: ctx.params.slug, body: "Great post" },
    ]), { name: "comments" }),
]);
// blog/urls.tsx — Self-contained blog module (RSC pages + JSON APIs)
const blogModulePatterns = urls(({ path, include }) => [
    path("/", () => null, { name: "index" }),
    path("/:slug", () => null, { name: "post" }),
    path("/category/:catId", () => null, { name: "category" }),
    // Blog's own API — nested include inside the module
    include("/api", blogApiPatterns, { name: "api" }),
]);
// app/urls.tsx — Main app mounts the blog module
const appPatterns = urls(({ path, include }) => [
    path("/", () => null, { name: "home" }),
    path("/about", () => null, { name: "about" }),
    include("/blog", blogModulePatterns, { name: "blog" }),
]);
// --- Scoped RouteResponse on the blog API (local typing, before mount) ---
describe("Mountable module — scoped RouteResponse on blog API", () => {
    it("should resolve stats response locally", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve parameterized likes response locally", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve array comments response locally", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("Mountable module — ScopedReverseFunction inside blog module", () => {
    it("should accept local RSC route names", () => {
        expectTypeOf().toBeCallableWith("index");
        expectTypeOf().toBeCallableWith("post", { slug: "hello" });
        expectTypeOf().toBeCallableWith("category", { catId: "tech" });
    });
    it("should accept nested API route names (after internal include)", () => {
        expectTypeOf().toBeCallableWith("api.stats");
        expectTypeOf().toBeCallableWith("api.likes", { slug: "hello" });
        expectTypeOf().toBeCallableWith("api.comments", { slug: "hello" });
    });
    it("should reject unknown names without escape hatches", () => {
        // No escape hatches: unknown dotted names are rejected
        // @ts-expect-error - "home.something" is not in BlogModuleMerged
        expectTypeOf().toBeCallableWith("home.something");
    });
});
// --- Blog module's own RouteResponse (before mounting) ---
describe("Mountable module — RouteResponse on blog module (pre-mount)", () => {
    it("should resolve API response through nested include", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve parameterized API response through nested include", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve array API response through nested include", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("Mountable module — ReverseFunction after mounting blog", () => {
    it("should accept top-level app routes", () => {
        expectTypeOf().toBeCallableWith("home");
        expectTypeOf().toBeCallableWith("about");
    });
    it("should accept blog RSC routes with blog. prefix", () => {
        expectTypeOf().toBeCallableWith("blog.index");
        expectTypeOf().toBeCallableWith("blog.post", { slug: "hello" });
        expectTypeOf().toBeCallableWith("blog.category", { catId: "tech" });
    });
    it("should accept blog API routes with blog.api. prefix (nested include)", () => {
        expectTypeOf().toBeCallableWith("blog.api.stats");
        expectTypeOf().toBeCallableWith("blog.api.likes", { slug: "hello" });
        expectTypeOf().toBeCallableWith("blog.api.comments", { slug: "hello" });
    });
});
describe("Mountable module — PathResponse after mounting blog", () => {
    // RSC routes — no response type
    it("should return ResponseEnvelope<never> for blog RSC routes", () => {
        expectTypeOf().toEqualTypeOf();
        expectTypeOf().toEqualTypeOf();
    });
    // Blog API routes — response types propagate through nested include
    it("should resolve blog API stats response", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve blog API likes response with params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve blog API comments array response", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("Mountable module — ParamsFor after mounting blog", () => {
    it("should extract params from mounted blog post route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract params from mounted blog category route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract params from nested blog API likes route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract params from nested blog API comments route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty params for static blog API stats route", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("Mountable module — ValidPaths after mounting blog", () => {
    it("should include all paths: app + blog RSC + blog API", () => {
        // App routes
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        // Blog RSC routes (prefixed /blog)
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        // Blog API routes (double-prefixed /blog/api)
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
    });
});
// ============================================================================
// Mixed routes: RSC with search + JSON response routes
// Tests that response types and search params coexist correctly
// ============================================================================
const mixedPatterns = urls(({ path }) => [
    // RSC route with search schema
    path("/search", () => null, { name: "search", search: { q: "string", page: "number?", sort: "string?" } }),
    // RSC route with params + search schema
    path("/category/:catId", () => null, { name: "category", search: { page: "number?", filter: "string?" } }),
    // JSON response route (no search schema)
    path.json("/api/health", () => ({ status: "ok", uptime: 123 }), { name: "api.health" }),
    // JSON response route with params
    path.json("/api/products/:id", (ctx) => ({ id: ctx.params.id, name: "Widget", price: 9.99 }), { name: "api.product" }),
    // JSON response route with search schema
    path.json("/api/items", () => [{ id: "1", name: "Thing" }], { name: "api.items", search: { q: "string?", limit: "number?", offset: "number?" } }),
    // JSON response route with params + search schema
    path.json("/api/users/:userId/posts", (ctx) => [{ id: "p1", author: ctx.params.userId }], { name: "api.userPosts", search: { page: "number?", tag: "string?" } }),
    // Plain RSC route
    path("/", () => null, { name: "home" }),
    path("/about", () => null, { name: "about" }),
]);
describe("RouteParams with mixed RSC + response routes", () => {
    it("should extract empty params for static RSC route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract empty params for RSC route with search (no path params)", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract path params for RSC route with search + params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract empty params for JSON response route (no path params)", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract params for JSON response route with path params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract empty params for path.json() route with search but no path params", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should extract params for path.json() route with params + search", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("RouteSearchParams with mixed RSC + response routes", () => {
    it("should resolve search schema for RSC route with search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve search schema for RSC route with params + search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty object for plain RSC route without search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty object for JSON response route without search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return empty object for JSON response route with params but no search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve search schema for path.json() route with search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve search schema for path.json() route with params + search", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("PathResponse with mixed RSC + response routes", () => {
    it("should resolve response envelope for JSON health route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response envelope for JSON product route", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response envelope for path.json() route with search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response envelope for path.json() route with params + search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return ResponseEnvelope<never> for RSC route with search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return ResponseEnvelope<never> for RSC route with params + search", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should return ResponseEnvelope<never> for plain RSC route", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("RouteResponse with mixed RSC + response routes", () => {
    it("should resolve response for JSON route by name", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response for JSON route with params by name", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response for path.json() route with search by name", () => {
        expectTypeOf().toEqualTypeOf();
    });
    it("should resolve response for path.json() route with params + search by name", () => {
        expectTypeOf().toEqualTypeOf();
    });
});
describe("ReverseFunction with mixed RSC + response routes", () => {
    it("should accept all route names", () => {
        expectTypeOf().toBeCallableWith("home");
        expectTypeOf().toBeCallableWith("about");
        expectTypeOf().toBeCallableWith("search");
        expectTypeOf().toBeCallableWith("api.health");
        expectTypeOf().toBeCallableWith("api.items");
    });
    it("should require params for routes with path params", () => {
        expectTypeOf().toBeCallableWith("category", { catId: "electronics" });
        expectTypeOf().toBeCallableWith("api.product", { id: "123" });
        expectTypeOf().toBeCallableWith("api.userPosts", { userId: "42" });
    });
});
describe("ValidPaths with mixed RSC + response routes", () => {
    it("should include all paths from mixed sources", () => {
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
        expectTypeOf().toMatchTypeOf();
    });
});
//# sourceMappingURL=reverse-types.test.js.map