Home / Function/ constructor() — astro Function Reference

constructor() — astro Function Reference

Architecture documentation for the constructor() function in render-context.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  8225581a_fdbf_53b7_3dc5_8e5da3f76d9d["constructor()"]
  b7425a46_8c1f_1122_7ae3_a00e52db1d90["RenderContext"]
  8225581a_fdbf_53b7_3dc5_8e5da3f76d9d -->|defined in| b7425a46_8c1f_1122_7ae3_a00e52db1d90
  style 8225581a_fdbf_53b7_3dc5_8e5da3f76d9d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/render-context.ts lines 65–85

	private constructor(
		readonly pipeline: Pipeline,
		public locals: App.Locals,
		readonly middleware: MiddlewareHandler,
		readonly actions: SSRActions,
		readonly serverIslands: ServerIslandMappings,
		// It must be a DECODED pathname
		public pathname: string,
		public request: Request,
		public routeData: RouteData,
		public status: number,
		public clientAddress: string | undefined,
		protected cookies = new AstroCookies(request),
		public params = getParams(routeData, pathname),
		protected url = RenderContext.#createNormalizedUrl(request.url),
		public props: Props = {},
		public partial: undefined | boolean = undefined,
		public shouldInjectCspMetaTags = pipeline.manifest.shouldInjectCspMetaTags,
		public session: AstroSession | undefined = undefined,
		public skipMiddleware = false,
	) {}

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the astro codebase, defined in packages/astro/src/core/render-context.ts.
Where is constructor() defined?
constructor() is defined in packages/astro/src/core/render-context.ts at line 65.

Analyze Your Own Codebase

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

Try Supermodel Free