Migrating some files from javascript to typescript (#24663)

* Migrating some files to typescript

* Some other files migrated

* Migrating more javascript to typescript

* Migrating more javascript to typescript

* Fixing types

* Fixing linter errors

* Fixing some imports

* Fixing linter errors

* Renaming the snapshots

* Addressing PR review comments
Этот коммит содержится в:
Jesús Espino
2023-10-10 16:22:11 +02:00
коммит произвёл GitHub
родитель 4ae44810d3
Коммит bb4aa764bc
53 изменённых файлов: 942 добавлений и 381 удалений

Просмотреть файл

@@ -72,7 +72,7 @@ type Props = {
/**
* The function to call to fetch team commands
*/
loadCommandsAndProfilesForTeam: (teamId?: string) => any; // TechDebt-TODO: This needs to be changed to 'Promise<void>'
loadCommandsAndProfilesForTeam: (teamId: string) => any; // TechDebt-TODO: This needs to be changed to 'Promise<void>'
};
/**
@@ -95,7 +95,7 @@ export default class CommandsContainer extends React.PureComponent<Props, State>
componentDidMount() {
if (this.props.enableCommands) {
this.props.actions.loadCommandsAndProfilesForTeam(this.props.team?.id).then(
this.props.actions.loadCommandsAndProfilesForTeam(this.props.team?.id || '').then(
() => this.setState({loading: false}),
);
}

Просмотреть файл

@@ -17,7 +17,7 @@ import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams';
import {getUsers} from 'mattermost-redux/selectors/entities/users';
import type {ActionResult, GenericAction} from 'mattermost-redux/types/actions';
import {loadIncomingHooksAndProfilesForTeam} from 'actions/integration_actions.jsx';
import {loadIncomingHooksAndProfilesForTeam} from 'actions/integration_actions';
import InstalledIncomingWebhooks from './installed_incoming_webhooks';