UNPKG

edges-svelte

Version:

A blazing-fast, extremely lightweight and SSR-friendly store for Svelte

19 lines (18 loc) 905 B
import type { RequestEvent } from '@sveltejs/kit'; type EdgesHandle = (event: RequestEvent, callback: (params: { edgesEvent: RequestEvent; serialize: (html: string) => string; }) => Promise<Response> | Response, silentChromeDevtools?: boolean) => Promise<Response>; /** * Wraps request handling in an AsyncLocalStorage context and provides a `serialize` function * for injecting state into the HTML response. * * @param event - The SvelteKit RequestEvent for the current request. * @param callback - A function that receives the event and a serialize function, * and returns a Response or a Promise of one. * @param silentChromeDevtools - If true, intercepts requests to * `/.well-known/appspecific/com.chrome.devtools.json` (triggered by Chrome DevTools) * and returns a 204 No Content response instead of a 404 error. */ export declare const edgesHandle: EdgesHandle; export {};