[]previous and next page

ParsedEnv

The validated variables.

The validated variables. all holds every variable of the schema; public only those named DUSK_PUBLIC_*, the only ones a client bundle may see.

Import#

ts
import type { ParsedEnv } from "@shadow-js/dusk/server";

Signature#

ts
interface ParsedEnv<S extends EnvShape = EnvShape> {
  readonly all: string extends keyof S
    ? Readonly<Record<string, unknown>>
    : { readonly [K in keyof S]: Resolved<S[K]> };
  readonly public: string extends keyof S
    ? Readonly<Record<string, unknown>>
    : { readonly [K in keyof S as K extends `DUSK_PUBLIC_${string}` ? K : never]: Resolved<S[K]> };
}

Members#

Name Type Description
S S extends EnvShape = EnvShape
all readonly all: string extends keyof S ? Readonly<Record<string, unknown>> : { readonly [K in keyof S]: Resolved<S[K]> }
public readonly public: string extends keyof S ? Readonly<Record<string, unknown>> : { readonly [K in keyof S as K extends `DUSK_PUBLIC_${string}` ? K : never]: Resolved<S[K]> }