UNPKG

grammy-class-composer

Version:

A simple composer to use Grammy js in a more Object oriented way

19 lines 636 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Hears = void 0; const Registry_1 = require("./Registry"); function Hears(query) { 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, query, type: Registry_1.MethodType.HEARS, }); }; } exports.Hears = Hears; //# sourceMappingURL=Hears.js.map