Method
_emitEvent
(type: EffectEventType, effect: IEffectInstance, data?: Record<string, unknown>)
Source from the content-addressed store, hash-verified
| 106 | } |
| 107 | |
| 108 | private _emitEvent(type: EffectEventType, effect: IEffectInstance, data?: Record<string, unknown>): void { |
| 109 | const event: IEffectEvent = { |
| 110 | type, |
| 111 | effect, |
| 112 | targetId: this._targetId, |
| 113 | timestamp: Date.now(), |
| 114 | data |
| 115 | }; |
| 116 | |
| 117 | this._listeners.get(type)?.forEach(listener => listener(event)); |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * @zh 应用效果 |
Tested by
no test coverage detected