Skip to content

checkPackSchema beta ​

Function of @v12-engine/engine

ts
export declare function checkPackSchema(json: unknown, schema: object): string | undefined;

Checks a pack's file against the pack's schema (@v12-engine/engine/schemas/pack.schema.json, made of PackFile): where it is first wrong, in words with its place (units[2].stats.health: is a string, not a number), or nothing for one that is right. A small reader of the schema, as far as it uses JSON Schema: what a page that loads packs fetches with them, so that a game without packs carries none of it