Skip to content

Commit 76d5e9b

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Added typing to actionsArr in routedescription and migrated code to typescript. IN action.tsx, added type union in props
1 parent c9b5370 commit 76d5e9b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/app/__tests__/RouteDescription.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
/* eslint-disable @typescript-eslint/no-explicit-any */
32
/* eslint-disable react/jsx-filename-extension */
43

@@ -11,7 +10,7 @@ import RouteDescription from '../components/RouteDescription';
1110
configure({ adapter: new (Adapter as any)() });
1211

1312
describe('Unit testing RouteDescription', () => {
14-
const actionsArr = [];
13+
const actionsArr: JSX.Element[] = [];
1514

1615
actionsArr.push(
1716
<Action

src/app/components/Action.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface ActionProps {
2222
componentData: { actualDuration: number } | undefined;
2323
routePath: any;
2424
state?: Record<string, unknown>;
25-
viewIndex: number;
25+
viewIndex: number | unknown;
2626
isCurrIndex: boolean;
2727
handleOnkeyDown: (e: any, i: number) => any;
2828
}

0 commit comments

Comments
 (0)