You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Chore: Desktop: Fix eslint issues and strengthen types in NoteEditor.tsx (#10449)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { useState, useEffect, useCallback, RefObject } from 'react';
|
||||
import { FormNote, defaultFormNote, ResourceInfos } from './types';
|
||||
import { clearResourceCache, attachedResources } from './resourceHandling';
|
||||
import AsyncActionQueue from '@joplin/lib/AsyncActionQueue';
|
||||
@ -25,14 +25,15 @@ export interface HookDependencies {
|
||||
decryptionStarted: boolean;
|
||||
noteId: string;
|
||||
isProvisional: boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
titleInputRef: any;
|
||||
titleInputRef: RefObject<HTMLInputElement>;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
editorRef: any;
|
||||
onBeforeLoad(event: OnLoadEvent): void;
|
||||
onAfterLoad(event: OnLoadEvent): void;
|
||||
}
|
||||
|
||||
export type SetFormNote = ReturnType<typeof useState<FormNote>>[1];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
|
||||
function installResourceChangeHandler(onResourceChangeHandler: Function) {
|
||||
ResourceFetcher.instance().on('downloadComplete', onResourceChangeHandler);
|
||||
|
Reference in New Issue
Block a user