rwsdk
Version:
Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime
18 lines (17 loc) • 650 B
TypeScript
export interface ClientNavigationOptions {
onNavigate?: () => void;
scrollToTop?: boolean;
scrollBehavior?: "auto" | "smooth" | "instant";
}
export declare function validateClickEvent(event: MouseEvent, target: HTMLElement): boolean;
export interface NavigateOptions {
history?: "push" | "replace";
info?: {
scrollToTop?: boolean;
scrollBehavior?: "auto" | "smooth" | "instant";
};
}
export declare function navigate(href: string, options?: NavigateOptions): Promise<void>;
export declare function initClientNavigation(opts?: ClientNavigationOptions): {
handleResponse: (response: Response) => boolean;
};