1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Tools: Add eslint rule @typescript-eslint/array-type

This commit is contained in:
Laurent Cozic
2023-06-30 09:16:08 +01:00
parent e89b59be8e
commit c6a15b3186
8 changed files with 8 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ type CallbackHandler<EventType> = (data: EventType)=> void;
export default class EventDispatcher<EventKeyType extends string|symbol|number, EventMessageType> {
// Partial marks all fields as optional. To initialize with an empty object, this is required.
// See https://stackoverflow.com/a/64526384
private listeners: Partial<Record<EventKeyType, Array<Listener<EventMessageType>>>>;
private listeners: Partial<Record<EventKeyType, Listener<EventMessageType>[]>>;
public constructor() {
this.listeners = {};
}