@ima/plugin-rest-client
Version:
Generic REST API client plugin for the IMA application framework.
33 lines (32 loc) • 973 B
JavaScript
/**
* Decorator for setting the static {@code idFieldName} property of an entity
* class, which specifies the name of the field that contains the entity's
* primary key (ID).
*
* @param {string} idParameterName The name of the field containing the
* entity's ID.
* @returns {function(function(
* new: AbstractEntity,
* RestClient,
* Object<string, *>,
* ?AbstractEntity=
* ))} Callback that sets the name of the field containing the entity's
* ID.
*/ "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, 'idFieldName', {
value: idParameterName
});
};
};
//# sourceMappingURL=idFieldName.js.map