mediatr-ts
Version:
Mimic the famous MediatR csharp library see: (https://github.com/jbogard/MediatR)
17 lines • 513 B
JavaScript
import { typeMappings } from "../models/mappings/index.js";
/**
* Decorate the requestHandler with this attribute
*
* @param value The request type
*/
var requestHandler = function (value) {
return function (target) {
typeMappings.requestHandlers.throwIfExistingTypeMappings(value);
typeMappings.requestHandlers.add({
requestClass: value,
handlerClass: target
});
};
};
export default requestHandler;
//# sourceMappingURL=requestHandler.attribute.js.map