grammy-class-composer
Version:
A simple composer to use Grammy js in a more Object oriented way
19 lines • 716 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AfterConstruct = void 0;
/* eslint-disable @typescript-eslint/ban-types */
const Registry_1 = require("./Registry");
function AfterConstruct() {
return function (target, propertyKey) {
const classInstance = (0, Registry_1.createOrFindClassEntry)(target);
if (classInstance == undefined) {
throw "No class Instance found for method: " + propertyKey;
}
classInstance.entries.push({
propertyKey,
type: Registry_1.MethodType.AFTER_CONSTRUCT
});
};
}
exports.AfterConstruct = AfterConstruct;
//# sourceMappingURL=AfterConstruct.js.map