Home / Function/ disablePreference() — astro Function Reference

disablePreference() — astro Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

packages/astro/src/cli/preferences/index.ts lines 191–202

async function disablePreference(
	settings: AstroSettings,
	key: PreferenceKey,
	{ location }: SubcommandOptions,
) {
	try {
		await settings.preferences.set(key, false, { location });
		console.log(msg.preferenceDisabled(key.replace('.enabled', '')));
		return 0;
	} catch {}
	return 1;
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does disablePreference() do?
disablePreference() is a function in the astro codebase, defined in packages/astro/src/cli/preferences/index.ts.
Where is disablePreference() defined?
disablePreference() is defined in packages/astro/src/cli/preferences/index.ts at line 191.
What calls disablePreference()?
disablePreference() 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