[]previous and next page

EnvSchema

A validated environment description.

A validated environment description.

Import#

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

Signature#

ts
interface EnvSchema<S extends EnvShape = EnvShape> {
  readonly shape: S;
  /**
   * Validates `source`.
   * @throws EnvError listing every invalid variable by name (never by value).
   */
  parse(source: EnvSource): ParsedEnv<S>;
}

Members#

Name Type Description
S S extends EnvShape = EnvShape
shape readonly shape: S
parse parse(source: EnvSource): ParsedEnv<S> Validates source.