Home / Function/ getConfigWithFallback() — astro Function Reference

getConfigWithFallback() — astro Function Reference

Architecture documentation for the getConfigWithFallback() function in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  fe2c05fb_e168_3d3e_067e_79fe7e234b35["getConfigWithFallback()"]
  aa586462_b436_2ea0_2f45_107a3d7bae01["AstroTelemetry"]
  fe2c05fb_e168_3d3e_067e_79fe7e234b35 -->|defined in| aa586462_b436_2ea0_2f45_107a3d7bae01
  eb8b7aa4_58e0_c90f_b7c3_177db81b292e["enabled()"]
  eb8b7aa4_58e0_c90f_b7c3_177db81b292e -->|calls| fe2c05fb_e168_3d3e_067e_79fe7e234b35
  d2c36394_50eb_07fc_771b_f58b743a9e4a["notifyDate()"]
  d2c36394_50eb_07fc_771b_f58b743a9e4a -->|calls| fe2c05fb_e168_3d3e_067e_79fe7e234b35
  4971db9e_d1b5_05a1_a10c_7048e3f2eda5["anonymousId()"]
  4971db9e_d1b5_05a1_a10c_7048e3f2eda5 -->|calls| fe2c05fb_e168_3d3e_067e_79fe7e234b35
  24d9f83c_b801_8b2d_38e2_a1cec12f8f32["anonymousSessionId()"]
  24d9f83c_b801_8b2d_38e2_a1cec12f8f32 -->|calls| fe2c05fb_e168_3d3e_067e_79fe7e234b35
  4ca5b560_8802_4457_edf0_d3977118051a["anonymousProjectInfo()"]
  4ca5b560_8802_4457_edf0_d3977118051a -->|calls| fe2c05fb_e168_3d3e_067e_79fe7e234b35
  style fe2c05fb_e168_3d3e_067e_79fe7e234b35 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/telemetry/src/index.ts lines 53–61

	private getConfigWithFallback<T>(key: string, getValue: () => T): T {
		const currentValue = this.config.get(key);
		if (currentValue !== undefined) {
			return currentValue;
		}
		const newValue = getValue();
		this.config.set(key, newValue);
		return newValue;
	}

Domain

Subdomains

Frequently Asked Questions

What does getConfigWithFallback() do?
getConfigWithFallback() is a function in the astro codebase, defined in packages/telemetry/src/index.ts.
Where is getConfigWithFallback() defined?
getConfigWithFallback() is defined in packages/telemetry/src/index.ts at line 53.
What calls getConfigWithFallback()?
getConfigWithFallback() is called by 5 function(s): anonymousId, anonymousProjectInfo, anonymousSessionId, enabled, notifyDate.

Analyze Your Own Codebase

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

Try Supermodel Free