Home / Type/ SSRResult Type — astro Architecture

SSRResult Type — astro Architecture

Architecture documentation for the SSRResult type/interface in internal.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  59d8b0c7_d745_7c89_1cbb_87433b96f29d["SSRResult"]
  5f8ae14a_9d99_50ef_07ac_b89e2336f3ca["internal.ts"]
  59d8b0c7_d745_7c89_1cbb_87433b96f29d -->|defined in| 5f8ae14a_9d99_50ef_07ac_b89e2336f3ca
  style 59d8b0c7_d745_7c89_1cbb_87433b96f29d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/types/public/internal.ts lines 197–255

export interface SSRResult {
	/**
	 * Whether the page has failed with a non-recoverable error, or the client disconnected.
	 */
	cancelled: boolean;
	base: string;
	userAssetsBase: string | undefined;
	styles: Set<SSRElement>;
	scripts: Set<SSRElement>;
	links: Set<SSRElement>;
	componentMetadata: Map<string, SSRComponentMetadata>;
	inlinedScripts: Map<string, string>;
	createAstro(props: Record<string, any>, slots: Record<string, any> | null): AstroGlobal;
	params: Params;
	resolve: (s: string) => Promise<string>;
	response: AstroGlobal['response'];
	request: AstroGlobal['request'];
	actionResult?: ReturnType<AstroGlobal['getActionResult']>;
	renderers: SSRLoadedRenderer[];
	/**
	 * Map of directive name (e.g. `load`) to the directive script code
	 */
	clientDirectives: Map<string, string>;
	compressHTML: boolean;
	partial: boolean;
	/**
	 * Only used for logging
	 */
	pathname: string;
	cookies: AstroCookies | undefined;
	serverIslandNameMap: Map<string, string>;
	trailingSlash: AstroConfig['trailingSlash'];
	key: Promise<CryptoKey>;
	_metadata: SSRMetadata;
	/**
	 * `header`:
	 * - <meta> for static pages
	 * - Response header for dynamic pages
	 *
	 * `meta`:
	 * - <meta> for all pages
	 *
	 * `adapter`:
	 * - nothing for static pages (the adapter does this)
	 * - Response header for dynamic pages
	 */
	// NOTE: we use a different type here because at runtime we must provide a value, which is
	// eventually computed from RouteData.prerender
	cspDestination: NonNullable<SSRManifestCSP['cspDestination']>;
	shouldInjectCspMetaTags: boolean;
	cspAlgorithm: SSRManifestCSP['algorithm'];
	scriptHashes: SSRManifestCSP['scriptHashes'];
	scriptResources: SSRManifestCSP['scriptResources'];
	styleHashes: SSRManifestCSP['styleHashes'];
	styleResources: SSRManifestCSP['styleResources'];
	directives: SSRManifestCSP['directives'];
	isStrictDynamic: SSRManifestCSP['isStrictDynamic'];
	internalFetchHeaders?: Record<string, string>;
}

Frequently Asked Questions

What is the SSRResult type?
SSRResult is a type/interface in the astro codebase, defined in packages/astro/src/types/public/internal.ts.
Where is SSRResult defined?
SSRResult is defined in packages/astro/src/types/public/internal.ts at line 197.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free