hedgedoc/docs/content/dev/design_docs/events.md
David Mehren 31969c56eb docs: add missing design docs disclaimer
Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-24 20:06:11 +01:00

904 B

Events

!!! info "Design Document" This is a design document, explaining the design and vision for a HedgeDoc 2 feature. It is not a user guide and may or may not be fully implemented.

In HedgeDoc 2, we use an event system based on EventEmitter2. It's used to reduce circular dependencies between different services and inform these services about changes.

HedgeDoc's system is basically the system NestJS offers.
The config for the EventEmitterModule is stored in events.ts and exported as eventModuleConfig.
In the same file enums for the event keys are defined. Each of these events is expected to be sent with an additional value. In the enum definition a comment should tell you what exactly this value should be.