import type { Component as SvelteComponent } from 'svelte'; import type { SveltePropsOf } from '../../types/svelte'; import { type StreamingSlotEnhancerOptions } from '../core/responseEnhancers'; export type SveltePageRenderOptions = { collectStreamingSlots?: boolean; bodyContent?: string; headContent?: string; /** Buffer this page's stream so it can carry a content-hash `ETag` and * serve a `304` on repeat visits, at the cost of streaming's fast first * byte. Only worth it on pages static enough that the 304 beats the * stream. See {@link PageCacheOptions.bufferStreamForEtag}. */ bufferStreamForEtag?: boolean; } & StreamingSlotEnhancerOptions; type HasNoSvelteProps = [Props] extends [never] ? true : keyof Props extends never ? true : false; export type SveltePageRequestInput = SvelteComponent>> = SveltePageRenderOptions & { indexPath: string; pagePath: string; /** The incoming Elysia request. When provided, the request's pathname * is auto-injected into props as `url` so the page can pass it into * `` without the caller threading it by hand. * User-supplied `props.url` (if present) takes precedence. */ request?: Request; /** Sitemap metadata for this route. Statically read from the handler * source at registration time, so only literal-object values are * honoured. */ sitemap?: import('../../types/sitemap').PageHandlerSitemapMetadata; } & (HasNoSvelteProps> extends true ? { props?: NoInfer>; } : { props: NoInfer>; }); export declare const handleSveltePageRequest: >(input: SveltePageRequestInput) => Promise; export {};