Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / validateDatapack

Function: validateDatapack() โ€‹

validateDatapack(dp, opts?): Promise<McdocDiagnostic[]>

Defined in: validate/mcdoc.ts:27

Validates a pack's emitted JSON against the vanilla schema. Returns diagnostics (empty = clean). Only throws on setup problems (missing packages, no network on first run).

Parameters โ€‹

dp โ€‹

Datapack

opts? โ€‹

ValidateOptions = {}

Returns โ€‹

Promise<McdocDiagnostic[]>

Example โ€‹

ts
const problems = await validateDatapack(dp);
  if (problems.length) console.error(formatMcdocDiagnostics(problems));

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.