Skip to content

Commit 44eb584

Browse files
committed
Removed commented out import hook, Add number type for ts to index variable
1 parent 0c51a12 commit 44eb584

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/masterState.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
/* eslint-disable guard-for-in */
55
/* eslint-disable no-restricted-syntax */
66

7-
// import {Hook}
87
import {
98
// eslint-disable-next-line @typescript-eslint/no-unused-vars
109
HookStateItem, // obj with state and component
@@ -18,7 +17,8 @@ import {
1817
// For functional components that utilize Hooks, there will be one "component"
1918
// for each setter/getter every time we have a new snapshot
2019
let componentActionsRecord: HookStates = [];
21-
let index = 0;
20+
let index: number;
21+
index = 0;
2222

2323
export default {
2424
clear: () => {
@@ -35,12 +35,12 @@ export default {
3535
getRecordByIndex: (inputIndex: number): HookStateItem => componentActionsRecord[inputIndex],
3636
// this is used for class components -
3737
/* inputIndex will always be a fixed number (coming in timeJump.ts) */
38-
getComponentByIndex: (inputIndex: number): any => (
38+
getComponentByIndex: (inputIndex: number): void => (
3939
componentActionsRecord[inputIndex]
4040
? componentActionsRecord[inputIndex].component
4141
: undefined),
4242
// 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> => {
4444
const multiDispatch = [];
4545
for (let i = 0; i < inputIndex.length; i++) {
4646
if (componentActionsRecord[inputIndex[i]]) {

0 commit comments

Comments
 (0)