@maverickcer/env-cap
    Preparing search index...

    Interface EnvDefinition<T>

    Configuration for one schema entry: how to default, process, and validate a single raw environment value.

    interface EnvDefinition<T> {
        context?: string;
        default?: unknown;
        processor?: Processor<T>;
        validator?: Validator<T>;
    }

    Type Parameters

    • T
    Index
    context?: string

    The validation context this variable belongs to (e.g. "server", "production", "worker") -- entirely application-defined; env-cap never interprets, detects, or infers this string. Omitted (the default) means the variable participates in every validateEnv run regardless of activeContexts. A variable belongs to at most one validation context -- see ADR 0022 for why this is a single string and not string[]; do not widen it to an array to let one variable join multiple contexts, that reintroduces the AND/OR ambiguity this design deliberately avoids.

    Validation contexts are a participation filter only -- not authentication, authorization, or a bundling/security boundary. See ADR 0022's Formal Invariants.

    default?: unknown

    Literal fallback or lazy thunk used when the raw value is undefined.

    processor?: Processor<T>

    Converts the raw (or defaulted) value to T; passed through unprocessed when omitted.

    validator?: Validator<T>

    Rejects an invalid processed value; return true to accept it.