Home / Function/ get() — astro Function Reference

get() — astro Function Reference

Architecture documentation for the get() function in runtime.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  f7f62311_5ea1_d1da_6248_79ef0fe49f0e["get()"]
  91969197_292d_3b15_21c6_0e876968e961["AstroSession"]
  f7f62311_5ea1_d1da_6248_79ef0fe49f0e -->|defined in| 91969197_292d_3b15_21c6_0e876968e961
  5c79ae32_65c5_f84c_14bd_7780a03d5e74["destroy()"]
  5c79ae32_65c5_f84c_14bd_7780a03d5e74 -->|calls| f7f62311_5ea1_d1da_6248_79ef0fe49f0e
  e9928270_af0e_f837_97fe_9ce156f87f20["crypto()"]
  e9928270_af0e_f837_97fe_9ce156f87f20 -->|calls| f7f62311_5ea1_d1da_6248_79ef0fe49f0e
  6a37e7b5_7d47_0edc_22a0_f1b1f4a991bb["AstroSession()"]
  6a37e7b5_7d47_0edc_22a0_f1b1f4a991bb -->|calls| f7f62311_5ea1_d1da_6248_79ef0fe49f0e
  style f7f62311_5ea1_d1da_6248_79ef0fe49f0e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/session/runtime.ts lines 115–121

	async get<T = void, K extends string = keyof App.SessionData | (string & {})>(
		key: K,
	): Promise<
		(T extends void ? (K extends keyof App.SessionData ? App.SessionData[K] : any) : T) | undefined
	> {
		return (await this.#ensureData()).get(key)?.data;
	}

Domain

Subdomains

Frequently Asked Questions

What does get() do?
get() is a function in the astro codebase, defined in packages/astro/src/core/session/runtime.ts.
Where is get() defined?
get() is defined in packages/astro/src/core/session/runtime.ts at line 115.
What calls get()?
get() is called by 3 function(s): AstroSession, crypto, destroy.

Analyze Your Own Codebase

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

Try Supermodel Free