2022-09-22 16:48:45 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
2023-02-06 07:21:58 -05:00
|
|
|
import { EventMap } from 'eventemitter2';
|
2022-09-22 16:48:45 -04:00
|
|
|
|
2022-09-22 16:08:23 -04:00
|
|
|
export const eventModuleConfig = {
|
|
|
|
wildcard: false,
|
|
|
|
delimiter: '.',
|
|
|
|
newListener: false,
|
|
|
|
removeListener: false,
|
|
|
|
maxListeners: 10,
|
|
|
|
verboseMemoryLeak: true,
|
|
|
|
ignoreErrors: false,
|
|
|
|
};
|
|
|
|
|
2022-09-22 16:48:45 -04:00
|
|
|
export enum NoteEvent {
|
2022-09-24 12:52:02 -04:00
|
|
|
PERMISSION_CHANGE = 'note.permission_change' /** noteId: The id of the [@link Note], which permissions are changed. **/,
|
|
|
|
DELETION = 'note.deletion' /** noteId: The id of the [@link Note], which is being deleted. **/,
|
2022-09-22 16:48:45 -04:00
|
|
|
}
|
2023-02-06 07:21:58 -05:00
|
|
|
|
|
|
|
export interface NoteEventMap extends EventMap {
|
|
|
|
[NoteEvent.PERMISSION_CHANGE]: (noteId: number) => void;
|
|
|
|
}
|