UNPKG

xcom2charpool

Version:

Library for reading, manipulating, and managing XCOM 2 character pool binary files, supporting both browser and Node.js environments.

14 lines (13 loc) 708 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.StructSchema = void 0; const v4_1 = __importDefault(require("zod/v4")); const StructPropertyValue_1 = require("./StructPropertyValue"); const StructSchema = (type, valueSchema) => { const structChecks = [v4_1.default.property('value', valueSchema)]; return v4_1.default.instanceof(StructPropertyValue_1.StructPropertyValue).check(...(type ? [...structChecks, v4_1.default.property('type', v4_1.default.literal(type))] : structChecks)); }; exports.StructSchema = StructSchema;