config.ts — astro Source File
Architecture documentation for config.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 0a56d59e_b0a7_ad9c_f55b_e2b288c2dadb["config.ts"] 3a338670_ef65_2b57_cc61_29c1c222b236["../../env/schema.js"] 0a56d59e_b0a7_ad9c_f55b_e2b288c2dadb --> 3a338670_ef65_2b57_cc61_29c1c222b236 style 0a56d59e_b0a7_ad9c_f55b_e2b288c2dadb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type {
BooleanField,
BooleanFieldInput,
EnumField,
EnumFieldInput,
NumberField,
NumberFieldInput,
StringField,
StringFieldInput,
} from './schema.js';
/**
* Return a valid env field to use in this Astro config for `env.schema`.
*/
export const envField = {
string: (options: StringFieldInput): StringField => ({
...options,
type: 'string',
}),
number: (options: NumberFieldInput): NumberField => ({
...options,
type: 'number',
}),
boolean: (options: BooleanFieldInput): BooleanField => ({
...options,
type: 'boolean',
}),
enum: <T extends string>(options: EnumFieldInput<T>): EnumField => ({
...options,
type: 'enum',
}),
};
Domain
Subdomains
Dependencies
- ../../env/schema.js
Source
Frequently Asked Questions
What does config.ts do?
config.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in config.ts?
config.ts defines 4 function(s): envField.boolean, envField.enum, envField.number, envField.string.
What does config.ts depend on?
config.ts imports 1 module(s): ../../env/schema.js.
Where is config.ts in the architecture?
config.ts is located at packages/astro/src/env/config.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/env).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free