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

    Interface DiscoveredSchemaVariable

    One schema entry's statically-discoverable shape -- presence facts, never evaluated/executed values.

    interface DiscoveredSchemaVariable {
        context: string | undefined;
        declaration: SourcePosition;
        defaultValue: { ok: true; value: unknown } | { ok: false } | undefined;
        hasDefault: boolean;
        hasProcessor: boolean;
        hasValidator: boolean;
        key: string;
        processorReturnType: string | undefined;
        processorSource: string | undefined;
        validatorSource: string | undefined;
    }

    Hierarchy (View Summary)

    Index
    context: string | undefined

    The variable's statically-resolved context, if set to a non-empty string literal (see ADR 0022). undefined when absent, non-literal, or empty.

    declaration: SourcePosition

    Where this variable's own schema property (e.g. SESSION_SECRET: z.string()) is declared -- distinct from the contract's declaration/documentation (link.ts); every variable has exactly one of these, always. See ADR 0036.

    defaultValue: { ok: true; value: unknown } | { ok: false } | undefined

    The default's statically-evaluated literal value, if hasDefault and it was a literal we could evaluate -- { ok: false } when present but not statically resolvable, undefined when absent.

    Type Declaration

    • { ok: true; value: unknown }
      • ok: true

        Always true in this branch.

      • value: unknown

        The evaluated literal value.

    • { ok: false }
      • ok: false

        Always false in this branch: present but not statically resolvable.

    • undefined
    hasDefault: boolean

    Whether the entry declares a default.

    hasProcessor: boolean

    Whether the entry declares a processor.

    hasValidator: boolean

    Whether the entry declares a validator.

    key: string

    The environment variable name (the schema's object key).

    processorReturnType: string | undefined

    Only present when the processor has an explicit : T return type annotation -- the one thing we treat as provable.

    processorSource: string | undefined

    The processor function's source text, normalized to single-line, if hasProcessor.

    validatorSource: string | undefined

    The validator function's source text, normalized to single-line, if hasValidator.