UNPKG

beth-parser

Version:

Parser library for Bethesda's Creation Engine data files

29 lines 889 B
"use strict"; exports.__esModule = true; var utils_1 = require("../../utils"); /** * Record (aka Form) entry. */ var RecordEntry = /** @class */ (function () { function RecordEntry(type, flags, formId, fields) { if (fields === void 0) { fields = []; } this.type = type; this.flags = flags; this.formId = formId; this.fields = fields; } /** * Convert to a more user-friendly format. */ RecordEntry.prototype.toJSON = function () { return { type: utils_1.decodeTypeTag(this.type), flags: utils_1.renderUint32(this.flags), formId: utils_1.renderUint32(this.formId), fields: this.fields.length ? this.fields : undefined }; }; return RecordEntry; }()); exports["default"] = RecordEntry; //# sourceMappingURL=RecordEntry.js.map