Home / Function/ EnvFieldType() — astro Function Reference

EnvFieldType() — astro Function Reference

Architecture documentation for the EnvFieldType() function in schema.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  ba6a9604_a5be_6bc8_0e8d_48be43679b81["EnvFieldType()"]
  d9c64fcc_8e8a_5778_7acf_2d11fa82f9c4["schema.ts"]
  ba6a9604_a5be_6bc8_0e8d_48be43679b81 -->|defined in| d9c64fcc_8e8a_5778_7acf_2d11fa82f9c4
  style ba6a9604_a5be_6bc8_0e8d_48be43679b81 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/env/schema.ts lines 51–62

	EnumSchema.superRefine((schema, ctx) => {
		if (schema.default) {
			if (!schema.values.includes(schema.default)) {
				ctx.addIssue({
					code: z.ZodIssueCode.custom,
					message: `The default value "${
						schema.default
					}" must be one of the specified values: ${schema.values.join(', ')}.`,
				});
			}
		}
	}),

Domain

Subdomains

Frequently Asked Questions

What does EnvFieldType() do?
EnvFieldType() is a function in the astro codebase, defined in packages/astro/src/env/schema.ts.
Where is EnvFieldType() defined?
EnvFieldType() is defined in packages/astro/src/env/schema.ts at line 51.

Analyze Your Own Codebase

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

Try Supermodel Free