Home / Function/ resetPreference() — astro Function Reference

resetPreference() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  443dfc64_c40a_725d_ee3b_fc5593232b27["resetPreference()"]
  f7d3fd10_bcd7_7c85_17b8_a4feb9026da8["index.ts"]
  443dfc64_c40a_725d_ee3b_fc5593232b27 -->|defined in| f7d3fd10_bcd7_7c85_17b8_a4feb9026da8
  4ec23106_e310_07dc_a9e9_e382aeb6a997["preferences()"]
  4ec23106_e310_07dc_a9e9_e382aeb6a997 -->|calls| 443dfc64_c40a_725d_ee3b_fc5593232b27
  style 443dfc64_c40a_725d_ee3b_fc5593232b27 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/cli/preferences/index.ts lines 204–215

async function resetPreference(
	settings: AstroSettings,
	key: PreferenceKey,
	{ location }: SubcommandOptions,
) {
	try {
		await settings.preferences.set(key, undefined as any, { location });
		console.log(msg.preferenceReset(key));
		return 0;
	} catch {}
	return 1;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does resetPreference() do?
resetPreference() is a function in the astro codebase, defined in packages/astro/src/cli/preferences/index.ts.
Where is resetPreference() defined?
resetPreference() is defined in packages/astro/src/cli/preferences/index.ts at line 204.
What calls resetPreference()?
resetPreference() is called by 1 function(s): preferences.

Analyze Your Own Codebase

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

Try Supermodel Free