interface SSRResult {
    _metadata: SSRMetadata;
    actionResult?: {
        data: unknown;
        error: undefined;
    } | {
        data: undefined;
        error: ActionError<{}>;
    } | {
        data: undefined;
        error: ActionError<FormData>;
    } | {
        data: undefined;
        error: ActionError<any>;
    };
    cancelled: boolean;
    clientDirectives: Map<string, string>;
    componentMetadata: Map<string, SSRComponentMetadata>;
    compressHTML: boolean;
    cookies: undefined | AstroCookies;
    inlinedScripts: Map<string, string>;
    links: Set<SSRElement>;
    partial: boolean;
    pathname: string;
    renderers: SSRLoadedRenderer[];
    request: Request;
    resolve: ((s) => Promise<string>);
    response: ResponseInit & {
        headers: Headers;
    };
    scripts: Set<SSRElement>;
    styles: Set<SSRElement>;
    createAstro(Astro, props, slots): AstroGlobal<Record<string, any>, AstroComponentFactory, Record<string, undefined | string>>;
}

Properties

_metadata: SSRMetadata
actionResult?: {
    data: unknown;
    error: undefined;
} | {
    data: undefined;
    error: ActionError<{}>;
} | {
    data: undefined;
    error: ActionError<FormData>;
} | {
    data: undefined;
    error: ActionError<any>;
}

Type declaration

  • data: unknown
  • error: undefined

Type declaration

Type declaration

Type declaration

cancelled: boolean

Whether the page has failed with a non-recoverable error, or the client disconnected.

clientDirectives: Map<string, string>

Map of directive name (e.g. load) to the directive script code

componentMetadata: Map<string, SSRComponentMetadata>
compressHTML: boolean
cookies: undefined | AstroCookies
inlinedScripts: Map<string, string>
links: Set<SSRElement>
partial: boolean
pathname: string

Only used for logging

renderers: SSRLoadedRenderer[]
request: Request
resolve: ((s) => Promise<string>)

Type declaration

response: ResponseInit & {
    headers: Headers;
}

Type declaration

scripts: Set<SSRElement>
styles: Set<SSRElement>

Methods