@mrhiden/cstruct
Version:
For packing and unpacking bytes (C like structures) in/from Buffer based on Object/Array type for parsing.
18 lines (17 loc) • 632 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CStructProperty = exports.CStructClass = void 0;
const decorators_metadata_1 = require("./decorators-metadata");
function CStructClass(options = {}) {
return function (target) {
decorators_metadata_1.CStructMetadata.addClass(target, options);
return target;
};
}
exports.CStructClass = CStructClass;
function CStructProperty(options) {
return function (target, propertyName) {
decorators_metadata_1.CStructMetadata.addProperty(target, propertyName, options);
};
}
exports.CStructProperty = CStructProperty;