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

Tools: Apply @typescript-eslint/ban-ts-comment rule

This commit is contained in:
Laurent Cozic
2023-06-30 10:22:47 +01:00
parent 7591a1182e
commit 48ef6db4a5
22 changed files with 47 additions and 78 deletions

View File

@@ -7,7 +7,7 @@ function useEventListener(
element?: any
) {
// Create a ref that stores handler
const savedHandler = useRef();
const savedHandler = useRef<any>();
useEffect(() => {
// Define the listening target
@@ -25,7 +25,6 @@ function useEventListener(
const eventListener = (event: Event) => {
// eslint-disable-next-line no-extra-boolean-cast
if (!!savedHandler?.current) {
// @ts-ignore
savedHandler.current(event);
}
};