From e9d38b52ce61efd2a27d99d890a93f38562226e8 Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Tue, 19 Nov 2024 08:10:33 +0100 Subject: [PATCH] fix: regenerate types --- packages/svelte/types/index.d.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index 00ba2556d9..1c321852d8 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -1737,6 +1737,26 @@ declare module 'svelte/server' { options: { props: Omit; context?: Map } ] ): RenderOutput; + + /** + * Only available on the server and when compiling with the `server` option. + * Takes a component and returns an object with `body` and `head` properties on it, which you can use to populate the HTML when server-rendering your app. + * Unlike `render` it doesn't render any hydration marker. + */ + export function renderStaticHTML< + Comp extends SvelteComponent | Component, + Props extends ComponentProps = ComponentProps + >( + ...args: {} extends Props + ? [ + component: Comp extends SvelteComponent ? ComponentType : Comp, + options?: { props?: Omit; context?: Map } + ] + : [ + component: Comp extends SvelteComponent ? ComponentType : Comp, + options: { props: Omit; context?: Map } + ] + ): RenderOutput; interface RenderOutput { /** HTML that goes into the `` */ head: string;