Skip to content

Commit

Permalink
[ts-migrate][.] Run TS Migrate
Browse files Browse the repository at this point in the history
Co-authored-by: ts-migrate <>
  • Loading branch information
Arnei committed Sep 7, 2023
1 parent 259513c commit ceabc66
Show file tree
Hide file tree
Showing 299 changed files with 6,803 additions and 184 deletions.
Empty file removed app/.eslintrc
Empty file.
2 changes: 2 additions & 0 deletions app/config-overrides.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// @ts-expect-error TS(2580): Cannot find name 'require'. Do you need to install... Remove this comment to see the full error message
const { override, addBabelPlugins } = require('customize-cra')

// @ts-expect-error TS(2580): Cannot find name 'module'. Do you need to install ... Remove this comment to see the full error message
module.exports = override(
addBabelPlugins(
'@babel/plugin-proposal-nullish-coalescing-operator',
Expand Down
4 changes: 4 additions & 0 deletions app/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import React from "react";
import { render } from "@testing-library/react";
// @ts-expect-error TS(6142): Module './App' was resolved to '/home/arnewilken/I... Remove this comment to see the full error message
import App from "./App";

// @ts-expect-error TS(2582): Cannot find name 'test'. Do you need to install ty... Remove this comment to see the full error message
test("renders learn react link", () => {
// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
// @ts-expect-error TS(2304): Cannot find name 'expect'.
expect(linkElement).toBeInTheDocument();
});
35 changes: 34 additions & 1 deletion app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,34 @@ import React, { useEffect } from "react";
import { connect } from "react-redux";
import { HashRouter, Navigate, Route, Routes } from "react-router-dom";
import "./App.scss";
// @ts-expect-error TS(6142): Module './components/events/Events' was resolved t... Remove this comment to see the full error message
import Events from "./components/events/Events";
// @ts-expect-error TS(6142): Module './components/recordings/Recordings' was re... Remove this comment to see the full error message
import Recordings from "./components/recordings/Recordings";
// @ts-expect-error TS(6142): Module './components/systems/Jobs' was resolved to... Remove this comment to see the full error message
import Jobs from "./components/systems/Jobs";
// @ts-expect-error TS(6142): Module './components/configuration/Themes' was res... Remove this comment to see the full error message
import Themes from "./components/configuration/Themes";
// @ts-expect-error TS(6142): Module './components/users/Users' was resolved to ... Remove this comment to see the full error message
import Users from "./components/users/Users";
// @ts-expect-error TS(6142): Module './components/statistics/Statistics' was re... Remove this comment to see the full error message
import Statistics from "./components/statistics/Statistics";
// @ts-expect-error TS(6142): Module './components/events/Series' was resolved t... Remove this comment to see the full error message
import Series from "./components/events/Series";
// @ts-expect-error TS(6142): Module './components/systems/Servers' was resolved... Remove this comment to see the full error message
import Servers from "./components/systems/Servers";
// @ts-expect-error TS(6142): Module './components/systems/Services' was resolve... Remove this comment to see the full error message
import Services from "./components/systems/Services";
// @ts-expect-error TS(6142): Module './components/users/Groups' was resolved to... Remove this comment to see the full error message
import Groups from "./components/users/Groups";
// @ts-expect-error TS(6142): Module './components/users/Acls' was resolved to '... Remove this comment to see the full error message
import Acls from "./components/users/Acls";
import { fetchOcVersion, fetchUserInfo } from "./thunks/userInfoThunks";

function App({ loadingUserInfo, loadingOcVersion }) {
function App({
loadingUserInfo,
loadingOcVersion
}: any) {
useEffect(() => {
// Load information about current user on mount
loadingUserInfo();
Expand All @@ -24,45 +38,64 @@ function App({ loadingUserInfo, loadingOcVersion }) {
}, [loadingOcVersion, loadingUserInfo]);

return (
// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<HashRouter>
// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Routes>
// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/"} element={<Events />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/events/events"} element={<Events />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/events/series"} element={<Series />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/recordings/recordings"} element={<Recordings />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/systems/jobs"} element={<Jobs />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/systems/servers"} element={<Servers />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/systems/services"} element={<Services />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/users/users"} element={<Users />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/users/groups"} element={<Groups />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/users/acls"} element={<Acls />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route exact path={"/configuration/themes"} element={<Themes />} />

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route
// @ts-expect-error TS(2322): Type '{ exact: true; path: string; element: Elemen... Remove this comment to see the full error message
exact
path={"/statistics/organization"}
// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
element={<Statistics />}
/>

// @ts-expect-error TS(17004): Cannot use JSX unless the '--jsx' flag is provided... Remove this comment to see the full error message
<Route
path={"*"}
// @ts-expect-error TS(2322): Type '{ path: string; render: () => Element; }' is... Remove this comment to see the full error message
render={() => <Navigate to={"/events/events"} replace />}
/>
</Routes>
</HashRouter>
);
}

// @ts-expect-error TS(7006): Parameter 'dispatch' implicitly has an 'any' type.
const mapDispatchToProps = (dispatch) => ({
loadingUserInfo: () => dispatch(fetchUserInfo()),
loadingOcVersion: () => dispatch(fetchOcVersion()),
Expand Down
2 changes: 2 additions & 0 deletions app/src/actions/aclActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const loadAclsInProgress = () => ({
type: LOAD_ACLS_IN_PROGRESS,
});

// @ts-expect-error TS(7006): Parameter 'acls' implicitly has an 'any' type.
export const loadAclsSuccess = (acls) => ({
type: LOAD_ACLS_SUCCESS,
payload: { acls },
Expand All @@ -27,6 +28,7 @@ export const loadAclsFailure = () => ({

// Actions affecting UI

// @ts-expect-error TS(7006): Parameter 'updatedColumns' implicitly has an 'any'... Remove this comment to see the full error message
export const setACLColumns = (updatedColumns) => ({
type: SET_ACL_COLUMNS,
payload: { updatedColumns },
Expand Down
1 change: 1 addition & 0 deletions app/src/actions/aclDetailsActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const loadAclDetailsInProgress = () => ({
type: LOAD_ACL_DETAILS_IN_PROGRESS,
});

// @ts-expect-error TS(7006): Parameter 'aclDetails' implicitly has an 'any' typ... Remove this comment to see the full error message
export const loadAclDetailsSuccess = (aclDetails) => ({
type: LOAD_ACL_DETAILS_SUCCESS,
payload: { aclDetails },
Expand Down
2 changes: 2 additions & 0 deletions app/src/actions/assetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const loadAssetUploadOptionsInProgress = () => ({
type: LOAD_ASSET_UPLOAD_OPTIONS_IN_PROGRESS,
});

// @ts-expect-error TS(7006): Parameter 'assetUploadOptions' implicitly has an '... Remove this comment to see the full error message
export const loadAssetUploadOptionsSuccess = (assetUploadOptions) => ({
type: LOAD_ASSET_UPLOAD_OPTIONS_SUCCESS,
payload: { assetUploadOptions },
Expand All @@ -26,6 +27,7 @@ export const loadAssetUploadOptionsFailure = () => ({
type: LOAD_ASSET_UPLOAD_OPTIONS_FAILURE,
});

// @ts-expect-error TS(7006): Parameter 'workflow' implicitly has an 'any' type.
export const setAssetUploadWorkflow = (workflow) => ({
type: SET_ASSET_UPLOAD_WORKFLOW,
payload: { workflow },
Expand Down
6 changes: 6 additions & 0 deletions app/src/actions/eventActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const loadEventsInProgress = () => ({
type: LOAD_EVENTS_IN_PROGRESS,
});

// @ts-expect-error TS(7006): Parameter 'events' implicitly has an 'any' type.
export const loadEventsSuccess = (events) => ({
type: LOAD_EVENTS_SUCCESS,
payload: { events },
Expand All @@ -43,16 +44,19 @@ export const loadEventsFailure = () => ({

// Actions affecting UI

// @ts-expect-error TS(7006): Parameter 'isShowing' implicitly has an 'any' type... Remove this comment to see the full error message
export const showActions = (isShowing) => ({
type: SHOW_ACTIONS_EVENTS,
payload: { isShowing },
});

// @ts-expect-error TS(7006): Parameter 'updatedColumns' implicitly has an 'any'... Remove this comment to see the full error message
export const setEventColumns = (updatedColumns) => ({
type: SET_EVENT_COLUMNS,
payload: { updatedColumns },
});

// @ts-expect-error TS(7006): Parameter 'id' implicitly has an 'any' type.
export const setEventSelected = (id) => ({
type: SET_EVENT_SELECTED,
payload: { id },
Expand All @@ -64,6 +68,7 @@ export const loadEventMetadataInProgress = () => ({
type: LOAD_EVENT_METADATA_IN_PROGRESS,
});

// @ts-expect-error TS(7006): Parameter 'metadata' implicitly has an 'any' type.
export const loadEventMetadataSuccess = (metadata, extendedMetadata) => ({
type: LOAD_EVENT_METADATA_SUCCESS,
payload: { metadata, extendedMetadata },
Expand All @@ -79,6 +84,7 @@ export const loadEventSchedulingInProgress = () => ({
type: LOAD_BULK_UPDATE_EVENT_SCHEDULING_IN_PROGRESS,
});

// @ts-expect-error TS(7006): Parameter 'editedEvents' implicitly has an 'any' t... Remove this comment to see the full error message
export const loadEventSchedulingSuccess = (editedEvents, seriesOptions) => ({
type: LOAD_BULK_UPDATE_EVENT_SCHEDULING_SUCCESS,
payload: { editedEvents, seriesOptions },
Expand Down
Loading

0 comments on commit ceabc66

Please sign in to comment.