UNPKG

chrono-forge

Version:

A comprehensive framework for building resilient Temporal workflows, advanced state management, and real-time streaming activities in TypeScript. Designed for a seamless developer experience with powerful abstractions, dynamic orchestration, and full cont

14 lines (13 loc) 505 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.On = void 0; require("reflect-metadata"); const metadata_1 = require("./metadata"); const On = (event) => { return (target, propertyKey) => { const eventHandlers = Reflect.getOwnMetadata(metadata_1.EVENTS_METADATA_KEY, target) || []; eventHandlers.push({ event, method: propertyKey }); Reflect.defineMetadata(metadata_1.EVENTS_METADATA_KEY, eventHandlers, target); }; }; exports.On = On;