UNPKG

@swtc/serializer

Version:
18 lines 616 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Utils_1 = require("../Utils"); const SerializedType_1 = __importDefault(require("./SerializedType")); const STInt16 = new SerializedType_1.default({ id: 1, serialize(so, val) { so.append((0, Utils_1.convertIntegerToByteArray)(val, 2)); }, parse(so) { return (0, Utils_1.readAndSum)(so, 2); } }); exports.default = STInt16; //# sourceMappingURL=STInt16.js.map