UNPKG

@ima/plugin-halson-rest-client

Version:
33 lines (32 loc) 1.05 kB
/** * Decorator for setting the static {@code idParameterName} property of an * entity class, which specifies the name of the ID parameter of an entity in * the entity's resource's links. * * @param {string} idParameterName The name of the link parameters used to * specify the ID(s) of the entity(ies). * @returns {function(function( * new: AbstractHalsonEntity, * HalsonRestClient, * Object<string, *>, * ?AbstractHalsonEntity= * ))} Callback that sets the ID link parameter name on the class * provided to it. */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; } }); const _default = (idParameterName)=>{ return (classConstructor)=>{ Object.defineProperty(classConstructor, 'idParameterName', { value: idParameterName }); }; }; //# sourceMappingURL=idParameterName.js.map