diff --git a/packages/bun-framework-react/client.tsx b/packages/bun-framework-react/client.tsx index f933c31bb8..f193682e9d 100644 --- a/packages/bun-framework-react/client.tsx +++ b/packages/bun-framework-react/client.tsx @@ -14,9 +14,9 @@ const td = new TextDecoder(); const windowDebugKey = "$bake"; interface WindowDebugObject { - navigate: (href: string, cacheId?: number) => Promise; - onServerSideReload: (cb: () => void | Promise) => Promise; - readonly currentCssList: string[] | undefined; + navigate: typeof navigate; + onServerSideReload: typeof onServerSideReload; + readonly currentCssList: typeof currentCssList; } type WindowWithBakeDebugObject = { [key in typeof windowDebugKey]: WindowDebugObject }; @@ -163,7 +163,7 @@ let lastNavigationController: AbortController; // Client side navigation is implemented by updating the app's `useState` with a // new RSC payload promise. Callers of `navigate` are expected to manage history // state. A navigation id is used -async function navigate(href: string, cacheId?: number) { +async function navigate(href: string, cacheId?: number): Promise { const thisNavigationId = ++lastNavigationId; const olderController = lastNavigationController;