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 { zodFieldView, zodField, zodRouterField, zodRouterFieldView } from "../zod";
|
2023-01-04 13:30:46 +00:00
|
|
|
|
|
|
|
export default function isRouterLinkedField(
|
|
|
|
field: z.infer<typeof zodFieldView> | z.infer<typeof zodField>
|
|
|
|
): field is z.infer<typeof zodRouterField> | z.infer<typeof zodRouterFieldView> {
|
|
|
|
if ("routerId" in field) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|