From 31b1872be1e8d010d2cbe08e92c589505e86d293 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 22 Jul 2024 15:26:27 -0400
Subject: adding type fixes to avoid 'any's

---
 src/client/views/nodes/RecordingBox/RecordingView.tsx | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

(limited to 'src/client/views/nodes/RecordingBox/RecordingView.tsx')

diff --git a/src/client/views/nodes/RecordingBox/RecordingView.tsx b/src/client/views/nodes/RecordingBox/RecordingView.tsx
index b8451fe60..37ffca2d6 100644
--- a/src/client/views/nodes/RecordingBox/RecordingView.tsx
+++ b/src/client/views/nodes/RecordingBox/RecordingView.tsx
@@ -1,6 +1,4 @@
-/* eslint-disable jsx-a11y/label-has-associated-control */
 /* eslint-disable react/button-has-type */
-/* eslint-disable jsx-a11y/control-has-associated-label */
 import * as React from 'react';
 import { useEffect, useRef, useState } from 'react';
 import { IconContext } from 'react-icons';
@@ -14,7 +12,7 @@ import { ProgressBar } from './ProgressBar';
 import './RecordingView.scss';
 
 export interface MediaSegment {
-    videoChunks: any[];
+    videoChunks: Blob[];
     endTime: number;
     startTime: number;
     presentation?: Presentation;
@@ -91,15 +89,15 @@ export function RecordingView(props: IRecordingViewProps) {
     }, []);
 
     useEffect(() => {
-        let interval: any = null;
+        let interval: null | NodeJS.Timeout = null;
         if (recording) {
             interval = setInterval(() => {
                 setRecordingTimer(unit => unit + 1);
             }, 10);
         } else if (!recording && recordingTimer !== 0) {
-            clearInterval(interval);
+            interval && clearInterval(interval);
         }
-        return () => clearInterval(interval);
+        return interval ? () => clearInterval(interval!) : undefined;
     }, [recording]);
 
     const setVideoProgressHelper = (curProgrss: number) => {
@@ -127,9 +125,9 @@ export function RecordingView(props: IRecordingViewProps) {
         if (!videoRecorder.current) videoRecorder.current = new MediaRecorder(await startShowingStream());
 
         // temporary chunks of video
-        let videoChunks: any = [];
+        let videoChunks: Blob[] = [];
 
-        videoRecorder.current.ondataavailable = (event: any) => {
+        videoRecorder.current.ondataavailable = (event: BlobEvent) => {
             if (event.data.size > 0) videoChunks.push(event.data);
         };
 
-- 
cgit v1.2.3-70-g09d2

