diff --git a/src/routing.ts b/src/routing.ts index e9ccc066..b3192698 100644 --- a/src/routing.ts +++ b/src/routing.ts @@ -68,7 +68,7 @@ export const useResolvedPath = (path: () => string) => { return createMemo(() => route.resolvePath(path())); }; -export const useHref = (to: () => string | undefined) => { +export const useHref = (to: () => T): string | T => { const router = useRouter(); return createMemo(() => { const to_ = to();