Skip to content

Commit

Permalink
ui: Downgrade TypeScript to 3.9.9 (#3906)
Browse files Browse the repository at this point in the history
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
  • Loading branch information
saswatamcode authored Mar 11, 2021
1 parent ebba2b8 commit 45163f2
Show file tree
Hide file tree
Showing 7 changed files with 558 additions and 519 deletions.
294 changes: 147 additions & 147 deletions pkg/ui/bindata.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/ui/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"sanitize-html": "^2.3.2",
"tempusdominus-bootstrap-4": "^5.39.0",
"tempusdominus-core": "^5.19.0",
"typescript": "^4.1.5",
"typescript": "3.9.9",
"use-query-params": "^1.1.9"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions pkg/ui/react-app/src/components/withStatusIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const withStatusIndicator = <T extends any>(Component: ComponentType<T>):
customErrorMsg,
componentTitle,
...rest
}) => {
}: StatusIndicatorProps) => {
if (error) {
return (
<UncontrolledAlert color="danger">
Expand All @@ -42,5 +42,5 @@ export const withStatusIndicator = <T extends any>(Component: ComponentType<T>):
/>
);
}
return <Component {...(rest as T)} />;
return <Component {...(rest as any)} />;
};
2 changes: 1 addition & 1 deletion pkg/ui/react-app/src/pages/graph/GraphControls.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe('GraphControls', () => {
const btn = group.find(Button).filterWhere((btn) => btn.prop('title') === testCase.title);
const onClick = btn.prop('onClick');
if (onClick) {
onClick({} as React.MouseEvent);
onClick({} as React.MouseEvent<HTMLButtonElement, MouseEvent>);
expect(results).toHaveLength(1);
expect(results[0]).toBe(!testCase.active);
results.pop();
Expand Down
1 change: 1 addition & 0 deletions pkg/ui/react-app/src/pages/graph/Panel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const defaultProps = {
useDeduplication: true,
usePartialResponse: false,
storeMatches: [],
defaultStep: '1s',
},
onOptionsChanged: (): void => {
// Do nothing.
Expand Down
1 change: 1 addition & 0 deletions pkg/ui/react-app/src/pages/graph/TimeInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('TimeInput', () => {
time: 1572102237932,
range: 60 * 60 * 7,
placeholder: 'time input',
useLocalTime: true,
onChangeTime: (): void => {
// Do nothing.
},
Expand Down
773 changes: 405 additions & 368 deletions pkg/ui/react-app/yarn.lock

Large diffs are not rendered by default.

0 comments on commit 45163f2

Please sign in to comment.