4
4
/* eslint-disable guard-for-in */
5
5
/* eslint-disable no-restricted-syntax */
6
6
7
- // import {Hook}
8
7
import {
9
8
// eslint-disable-next-line @typescript-eslint/no-unused-vars
10
9
HookStateItem , // obj with state and component
@@ -18,7 +17,8 @@ import {
18
17
// For functional components that utilize Hooks, there will be one "component"
19
18
// for each setter/getter every time we have a new snapshot
20
19
let componentActionsRecord : HookStates = [ ] ;
21
- let index = 0 ;
20
+ let index : number ;
21
+ index = 0 ;
22
22
23
23
export default {
24
24
clear : ( ) => {
@@ -35,12 +35,12 @@ export default {
35
35
getRecordByIndex : ( inputIndex : number ) : HookStateItem => componentActionsRecord [ inputIndex ] ,
36
36
// this is used for class components -
37
37
/* inputIndex will always be a fixed number (coming in timeJump.ts) */
38
- getComponentByIndex : ( inputIndex : number ) : any => (
38
+ getComponentByIndex : ( inputIndex : number ) : void => (
39
39
componentActionsRecord [ inputIndex ]
40
40
? componentActionsRecord [ inputIndex ] . component
41
41
: undefined ) ,
42
42
// this is used for react hooks - hooks will be passed in as an array from timeJump.ts
43
- getComponentByIndexHooks : ( inputIndex : Array < number > = [ ] ) : any => {
43
+ getComponentByIndexHooks : ( inputIndex : Array < number > = [ ] ) : Array < any > => {
44
44
const multiDispatch = [ ] ;
45
45
for ( let i = 0 ; i < inputIndex . length ; i ++ ) {
46
46
if ( componentActionsRecord [ inputIndex [ i ] ] ) {
0 commit comments