Utility function to construct a routing path along with its parameters.
import { routePath } from "dreamkit";
declare const routePath: (path: string, params?: Record<string, any>) => string;
import { $route, routePath, s } from "dreamkit"; export const userRoute = $route .params({ id: s.number() }) .path(({ id }) => `/user/${id}`) .create(({ params }) => <>id: {params.id}</>); export default $route.path("/").create(() => { return <a href={routePath("/user/:id", { id: 1 })}>User 1</a>;});