JSON schema files for TeX Live resources
This package provides JSON schema files and TypeScript type definitions for TeX Live JSON formats, with minor modifications to match the actual output.
npm install texlive-json-schemas
import Ajv from 'ajv';
import tlpdb from 'texlive-json-schemas/tlpdb.schema.json';
import type { TLPDB } from 'texlive-json-schemas/types';
const ajv = new Ajv();
const json: unknown = { ... };
if (ajv.validate<TLPDB>(tlpdb, json)) {
// typeof json === TLPDB
}