We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c9eb8e commit b93c0f9Copy full SHA for b93c0f9
src/routing.ts
@@ -68,7 +68,7 @@ export const useResolvedPath = (path: () => string) => {
68
return createMemo(() => route.resolvePath(path()));
69
};
70
71
-export const useHref = (to: () => string | undefined) => {
+export const useHref = <T extends string | undefined>(to: () => T): string | T => {
72
const router = useRouter();
73
return createMemo(() => {
74
const to_ = to();
0 commit comments