Home / Function/ confirm() — astro Function Reference

confirm() — astro Function Reference

Architecture documentation for the confirm() function in prompts-prompt.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  475787a3_47b1_dd94_664f_398c0613f174["confirm()"]
  c6a03723_465f_71d3_a6a3_bfa007d8428e["PromptsPrompt"]
  475787a3_47b1_dd94_664f_398c0613f174 -->|defined in| c6a03723_465f_71d3_a6a3_bfa007d8428e
  style 475787a3_47b1_dd94_664f_398c0613f174 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/cli/info/infra/prompts-prompt.ts lines 11–28

	async confirm({
		message,
		defaultValue,
	}: {
		message: string;
		defaultValue?: boolean;
	}): Promise<boolean> {
		if (this.#force) {
			return true;
		}
		const { value } = await prompts({
			type: 'confirm',
			name: 'value',
			message,
			initial: defaultValue,
		});
		return value;
	}

Domain

Subdomains

Frequently Asked Questions

What does confirm() do?
confirm() is a function in the astro codebase, defined in packages/astro/src/cli/info/infra/prompts-prompt.ts.
Where is confirm() defined?
confirm() is defined in packages/astro/src/cli/info/infra/prompts-prompt.ts at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free