Setu-TS
    Preparing search index...

    Interface IEnvironmentApi

    Environment validation surface: plugins declare the environment variables they need, and the kernel validates them at startup, failing fast on violations.

    0.1.0

    interface IEnvironmentApi {
        validate(spec: Readonly<Record<string, EnvVarSpec>>): void;
    }
    Index
    • Declares and validates environment variables.

      Call this from IPlugin.register. The kernel validates every declared spec once, after all plugins have registered and before the init hooks run, so a spec declared later (e.g. from an onInit hook) is never checked.

      Parameters

      • spec: Readonly<Record<string, EnvVarSpec>>

        Variable specifications keyed by variable name

      Returns void

      At startup when a required variable is missing or mistyped