2023-02-16 22:39:57 +00:00
|
|
|
import type { z } from "zod";
|
2023-01-04 13:30:46 +00:00
|
|
|
|
2023-02-16 22:39:57 +00:00
|
|
|
import type { zodRouterRouteView, zodRoute, zodRouterRoute, zodRouteView } from "../zod";
|
2023-01-04 13:30:46 +00:00
|
|
|
|
|
|
|
export default function isRouter(
|
|
|
|
route: z.infer<typeof zodRouteView> | z.infer<typeof zodRoute>
|
|
|
|
): route is z.infer<typeof zodRouterRouteView> | z.infer<typeof zodRouterRoute> {
|
|
|
|
if ("isRouter" in route) {
|
|
|
|
return route.isRouter;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|