Skip to content

validatePrerequisiteGraph

function validatePrerequisiteGraph(flags): ValidationIssue[];

Defined in: validation.ts:399

Cross-flag prerequisite validation: every referenced flag/variant exists and the dependency graph is acyclic. Returns an empty array when sound.

Parameter Type
flags Record<string, Flag>

ValidationIssue[]

import { validatePrerequisiteGraph } from "@xtandard/flags";
const errors = validatePrerequisiteGraph(draft.flags);
if (errors.length) console.error(errors);