interface FromConfigOptions
Since 0.2.0

Properties

readonly
optional
config: ConfigPluginOptions

Loading options — .env paths, variable expansion, validation schema.

Forwarded to the loader and carried into the application's own config arm, so one options object governs both.

readonly
optional
env: Readonly<Record<string, unknown>> | undefined

The environment to read configuration from, instead of the platform's.

Required on Cloudflare Workers, and the only way this factory works there: Workers bindings arrive as the env argument of the fetch handler, never as a process-wide global, so runtime services built outside a request report an EMPTY environment. Without this the application composes from no configuration at all — and a resolver calling getOrThrow then fails on the first request and, because the boot promise is memoised, on every request after it.

Omit it on Node, Deno, and Bun: those expose the environment process-wide, and the detected runtime already reads it.

Non-string values are ignored, so a Workers env carrying KV, D1, or R2 bindings alongside its string variables can be passed verbatim.

Explicitly | undefined under exactOptionalPropertyTypes: callers forward an optional binding straight through ({ env } where env may be undefined), which would not otherwise type-check against an optional property. The generated Workers entry does exactly that on all four targets.

Usage

import { type FromConfigOptions } from "starters/full-stack-starter/src/index.ts";