[]previous and next page

validateDuskConfig

Validates the file's default export.

Validates the file's default export. Throws at the first problem, with the key that has it.

Import#

ts
import { validateDuskConfig } from "@shadow-js/dusk/vite";

Signature#

ts
function validateDuskConfig(raw: unknown): DuskConfig

Parameters#

Name Description
raw The value the file exports.

Returns#

The same value, typed.

Throws#

  • TypeError for an unknown or plugin-only key, a bad value, or a routing rule that fails validateRouting.

Examples#

ts
import { validateDuskConfig } from "@shadow-js/dusk/vite";
validateDuskConfig({ deploymentId: "rel-42" }).deploymentId; // "rel-42"