import { ChangeDispatcher, getChangeDispatcher } from '../internals/ChangeDispatcher'; export type DispatcherDecorated = { [key in Key]: ChangeDispatcher; }; export const Dispatcher = () => { return function (objOrCls: DispatcherDecorated, propertyKey: Key) { Object.defineProperties(objOrCls, { [propertyKey]: { get: function (this: typeof objOrCls) { return getChangeDispatcher(this, true); }, }, }); }; };