Type Alias: TypedEnvironment\<SiteEnv, ApiEnv\>
@arolariu/website / types / TypedEnvironment
Type Alias: TypedEnvironment<SiteEnv, ApiEnv>
TypedEnvironment<
SiteEnv,ApiEnv> =Readonly<SiteEnvironmentVariables<SiteEnv> &ApiEnvironmentVariables<ApiEnv> &AuthEnvironmentVariables&AzureRuntimeEnvironmentVariables&LegacyRuntimeEnvironmentVariables&MetadataEnvironmentVariables>
Defined in: types/typedEnv.ts:208
Consolidated environment-variable contract for the website.
Type Parameters
SiteEnv
SiteEnv extends "production" | "development"
The site environment ("production" | "development")
ApiEnv
ApiEnv extends "production"
The API environment (currently only "production")
Remarks
The preferred runtime contract is now:
- site metadata (
SITE_*) - Clerk keys
- build metadata (
TIMESTAMP,COMMIT_SHA,USE_CDN) - optional Azure managed-identity identifiers
API endpoint, auth secret, Resend key, and configuration-store access are expected to come from exp at runtime. Their legacy env fallbacks remain optional to preserve compatibility during the rollout.
Example
const prodEnv: TypedEnvironment<"production", "production"> = {
SITE_ENV: "PRODUCTION",
SITE_NAME: "arolariu.ro",
SITE_URL: "https://arolariu.ro",
// ... other required variables
};
See
- SiteEnvironmentVariables
- ApiEnvironmentVariables
- AuthEnvironmentVariables
- MetadataEnvironmentVariables