UNPKG

1.35 kBTypeScriptView Raw
1import { h, FunctionalComponent, JSX, ComponentType, ComponentProps } from "preact";
2export declare const __HeadContext: import("preact").Context<{
3 head: {
4 current: any[];
5 };
6}>;
7/** @internal */
8export declare const __InternalDocContext: import("preact").Context<any>;
9interface RenderPageResult {
10 __renderPageResult: any;
11 [key: string]: any;
12}
13export declare const defineDocument: <T extends ComponentType<any>>(Document: T, ctx: {
14 prepare: (ctx: {
15 renderPage: () => Promise<RenderPageResult>;
16 }) => Promise<Omit<ComponentProps<T>, "children"> & RenderPageResult>;
17}) => T & {
18 prepare: (ctx: {
19 renderPage: () => Promise<RenderPageResult>;
20 }) => Promise<Omit<ComponentProps<T>, "children"> & RenderPageResult>;
21};
22export declare const Document: (() => h.JSX.Element) & {
23 prepare: (ctx: {
24 renderPage: () => Promise<RenderPageResult>;
25 }) => Promise<Omit<unknown, "children"> & RenderPageResult>;
26};
27export declare const Html: FunctionalComponent<JSX.HTMLAttributes<HTMLHtmlElement>>;
28export declare const Main: FunctionalComponent<Omit<JSX.HTMLAttributes<HTMLDivElement>, "id" | "dangerouslySetInnerHTML" | "children">>;
29export declare const Head: FunctionalComponent<JSX.HTMLAttributes<HTMLHeadElement>>;
30export declare const MicrositeScript: FunctionalComponent;
31export {};