| 1 |
|
| 2 | import { Action } from "../../router/history.js";
|
| 3 | import { DataStrategyFunction } from "../../router/utils.js";
|
| 4 | import { Router } from "../../router/router.js";
|
| 5 | import { RouteModules } from "./routeModules.js";
|
| 6 | import { AssetsManifest } from "./entry.js";
|
| 7 |
|
| 8 | declare const SingleFetchRedirectSymbol: unique symbol;
|
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | type RouterFetchContext = {
|
| 23 | type: "manifest";
|
| 24 | } | {
|
| 25 | type: "navigation";
|
| 26 | fetcherKey: string | null;
|
| 27 | navigationType: Action;
|
| 28 | } | {
|
| 29 | type: "initialization" | "fetcher" | "revalidation";
|
| 30 | fetcherKey: string | null;
|
| 31 | navigationType: null;
|
| 32 | };
|
| 33 | type RouterFetch = (request: Request, context: RouterFetchContext) => Promise<Response>;
|
| 34 | declare function getTurboStreamSingleFetchDataStrategy(getRouter: () => Router, manifest: AssetsManifest, routeModules: RouteModules, ssr: boolean, fetchImplementation?: RouterFetch, isApiOnly?: boolean, serverOrigin?: string): DataStrategyFunction;
|
| 35 | declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{
|
| 36 | done: Promise<void>;
|
| 37 | value: unknown;
|
| 38 | }>;
|
| 39 |
|
| 40 | export { RouterFetch, RouterFetchContext, SingleFetchRedirectSymbol, decodeViaTurboStream, getTurboStreamSingleFetchDataStrategy }; |
| \ | No newline at end of file |