1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Tools: Apply rule @typescript-eslint/ban-types

This commit is contained in:
Laurent Cozic
2023-06-30 10:30:29 +01:00
parent 48ef6db4a5
commit dd6eec6a03
153 changed files with 296 additions and 9 deletions

View File

@ -68,6 +68,7 @@ export default class JoplinWorkspace {
/**
* Called when a new note or notes are selected.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onNoteSelectionChange(callback: Function): Promise<Disposable> {
eventManager.appStateOn('selectedNoteIds', callback);
@ -84,6 +85,7 @@ export default class JoplinWorkspace {
* Called when the content of a note changes.
* @deprecated Use `onNoteChange()` instead, which is reliably triggered whenever the note content, or any note property changes.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onNoteContentChange(callback: Function) {
eventManager.on('noteContentChange', callback);
}
@ -116,6 +118,7 @@ export default class JoplinWorkspace {
/**
* Called when an alarm associated with a to-do is triggered.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onNoteAlarmTrigger(handler: Function): Promise<Disposable> {
return makeListener(eventManager, 'noteAlarmTrigger', handler);
}
@ -130,6 +133,7 @@ export default class JoplinWorkspace {
/**
* Called when the synchronisation process has finished.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onSyncComplete(callback: Function): Promise<Disposable> {
return makeListener(eventManager, 'syncComplete', callback);
}