ref(TS) Remove unnecessary ts-ignores (#12136)

This commit is contained in:
Robert Pintilii 2022-09-07 11:20:05 +03:00 committed by GitHub
parent fa942e9f3b
commit c9bbc6c762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 52 additions and 69 deletions

View File

@ -3,8 +3,8 @@ import type { Dispatch } from 'redux';
// @ts-ignore // @ts-ignore
import UIEvents from '../../../../service/UI/UIEvents'; import UIEvents from '../../../../service/UI/UIEvents';
// @ts-ignore import { createAudioOnlyChangedEvent } from '../../analytics/AnalyticsEvents';
import { createAudioOnlyChangedEvent, sendAnalytics } from '../../analytics'; import { sendAnalytics } from '../../analytics/functions';
import { SET_AUDIO_ONLY } from './actionTypes'; import { SET_AUDIO_ONLY } from './actionTypes';
import logger from './logger'; import logger from './logger';

View File

@ -2,8 +2,8 @@
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
// @ts-ignore import { createToolbarEvent } from '../../../../analytics/AnalyticsEvents';
import { createToolbarEvent, sendAnalytics } from '../../../../analytics'; import { sendAnalytics } from '../../../../analytics/functions';
// @ts-ignore // @ts-ignore
import { appNavigate } from '../../../../app/actions'; import { appNavigate } from '../../../../app/actions';
import Button from '../../../../base/ui/components/native/Button'; import Button from '../../../../base/ui/components/native/Button';

View File

@ -5,11 +5,10 @@ import { useDispatch, useSelector } from 'react-redux';
import { import {
createShortcutEvent, createShortcutEvent,
sendAnalytics,
ACTION_SHORTCUT_PRESSED as PRESSED, ACTION_SHORTCUT_PRESSED as PRESSED,
ACTION_SHORTCUT_RELEASED as RELEASED ACTION_SHORTCUT_RELEASED as RELEASED
// @ts-ignore } from '../../../../analytics/AnalyticsEvents';
} from '../../../../analytics'; import { sendAnalytics } from '../../../../analytics/functions';
import { IState } from '../../../../app/types'; import { IState } from '../../../../app/types';
// @ts-ignore // @ts-ignore
import { getFeatureFlag, AUDIO_MUTE_BUTTON_ENABLED } from '../../../../base/flags'; import { getFeatureFlag, AUDIO_MUTE_BUTTON_ENABLED } from '../../../../base/flags';

View File

@ -3,8 +3,8 @@ import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
// @ts-ignore import { createE2EEEvent } from '../../analytics/AnalyticsEvents';
import { createE2EEEvent, sendAnalytics } from '../../analytics'; import { sendAnalytics } from '../../analytics/functions';
import { IState } from '../../app/types'; import { IState } from '../../app/types';
import { translate } from '../../base/i18n/functions'; import { translate } from '../../base/i18n/functions';
import { connect } from '../../base/redux/functions'; import { connect } from '../../base/redux/functions';

View File

@ -7,12 +7,8 @@ import { WithTranslation } from 'react-i18next';
import { FixedSizeList, FixedSizeGrid } from 'react-window'; import { FixedSizeList, FixedSizeGrid } from 'react-window';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
import { import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents';
createShortcutEvent, import { sendAnalytics } from '../../../analytics/functions';
createToolbarEvent,
sendAnalytics
// @ts-ignore
} from '../../../analytics';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
// @ts-ignore // @ts-ignore
import { getSourceNameSignalingFeatureFlag, getToolbarButtons } from '../../../base/config'; import { getSourceNameSignalingFeatureFlag, getToolbarButtons } from '../../../base/config';
@ -797,6 +793,7 @@ class Filmstrip extends PureComponent <Props, State> {
_onShortcutToggleFilmstrip() { _onShortcutToggleFilmstrip() {
sendAnalytics(createShortcutEvent( sendAnalytics(createShortcutEvent(
'toggle.filmstrip', 'toggle.filmstrip',
ACTION_SHORTCUT_TRIGGERED,
{ {
enable: this.props._mainFilmstripVisible enable: this.props._mainFilmstripVisible
})); }));

View File

@ -4,8 +4,8 @@ import clsx from 'clsx';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import React, { Component } from 'react'; import React, { Component } from 'react';
// @ts-ignore import { createScreenSharingIssueEvent } from '../../../analytics/AnalyticsEvents';
import { createScreenSharingIssueEvent, sendAnalytics } from '../../../analytics'; import { sendAnalytics } from '../../../analytics/functions';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
// @ts-ignore // @ts-ignore
import { Avatar } from '../../../base/avatar'; import { Avatar } from '../../../base/avatar';

View File

@ -7,8 +7,8 @@ import React, { useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { batch, useDispatch, useSelector } from 'react-redux'; import { batch, useDispatch, useSelector } from 'react-redux';
// @ts-ignore import { createGifSentEvent } from '../../../analytics/AnalyticsEvents';
import { createGifSentEvent, sendAnalytics } from '../../../analytics'; import { sendAnalytics } from '../../../analytics/functions';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
// @ts-ignore // @ts-ignore
import InputField from '../../../base/premeeting/components/web/InputField'; import InputField from '../../../base/premeeting/components/web/InputField';

View File

@ -2,8 +2,8 @@
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
// @ts-ignore import { createBreakoutRoomsEvent } from '../../../../../analytics/AnalyticsEvents';
import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics'; import { sendAnalytics } from '../../../../../analytics/functions';
import Button from '../../../../../base/ui/components/native/Button'; import Button from '../../../../../base/ui/components/native/Button';
import { BUTTON_TYPES } from '../../../../../base/ui/constants'; import { BUTTON_TYPES } from '../../../../../base/ui/constants';
// @ts-ignore // @ts-ignore

View File

@ -4,8 +4,8 @@ import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
// @ts-ignore import { createBreakoutRoomsEvent } from '../../../../../analytics/AnalyticsEvents';
import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics'; import { sendAnalytics } from '../../../../../analytics/functions';
import Button from '../../../../../base/ui/components/web/Button'; import Button from '../../../../../base/ui/components/web/Button';
import { Theme } from '../../../../../base/ui/types'; import { Theme } from '../../../../../base/ui/types';
// @ts-ignore // @ts-ignore

View File

@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
// @ts-ignore import { createBreakoutRoomsEvent } from '../../../../../analytics/AnalyticsEvents';
import { createBreakoutRoomsEvent, sendAnalytics } from '../../../../../analytics'; import { sendAnalytics } from '../../../../../analytics/functions';
import Button from '../../../../../base/ui/components/web/Button'; import Button from '../../../../../base/ui/components/web/Button';
import { BUTTON_TYPES } from '../../../../../base/ui/constants'; import { BUTTON_TYPES } from '../../../../../base/ui/constants';
// @ts-ignore // @ts-ignore

View File

@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
// @ts-ignore import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { createToolbarEvent, sendAnalytics } from '../../../analytics'; import { sendAnalytics } from '../../../analytics/functions';
import { IconInviteMore } from '../../../base/icons/svg'; import { IconInviteMore } from '../../../base/icons/svg';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';
import { BUTTON_TYPES } from '../../../base/ui/constants'; import { BUTTON_TYPES } from '../../../base/ui/constants';

View File

@ -3,8 +3,8 @@ import React, { ComponentType, useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
// @ts-ignore import { createPollEvent } from '../../analytics/AnalyticsEvents';
import { sendAnalytics, createPollEvent } from '../../analytics'; import { sendAnalytics } from '../../analytics/functions';
import { IState } from '../../app/types'; import { IState } from '../../app/types';
import { getLocalParticipant, getParticipantById } from '../../base/participants/functions'; import { getLocalParticipant, getParticipantById } from '../../base/participants/functions';
import { useBoundSelector } from '../../base/util/hooks'; import { useBoundSelector } from '../../base/util/hooks';

View File

@ -5,12 +5,8 @@ import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import { import { createReactionMenuEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents';
createReactionMenuEvent, import { sendAnalytics } from '../../../analytics/functions';
createToolbarEvent,
sendAnalytics
// @ts-ignore
} from '../../../analytics';
import { IState, IStore } from '../../../app/types'; import { IState, IStore } from '../../../app/types';
import { isMobileBrowser } from '../../../base/environment/utils'; import { isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';

View File

@ -1,8 +1,8 @@
/* eslint-disable lines-around-comment */ /* eslint-disable lines-around-comment */
import { batch } from 'react-redux'; import { batch } from 'react-redux';
// @ts-ignore import { createReactionSoundsDisabledEvent } from '../analytics/AnalyticsEvents';
import { createReactionSoundsDisabledEvent, sendAnalytics } from '../analytics'; import { sendAnalytics } from '../analytics/functions';
import { IStore } from '../app/types'; import { IStore } from '../app/types';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes'; import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app/actionTypes';
import { import {

View File

@ -2,11 +2,8 @@
import { Component } from 'react'; import { Component } from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
import { import { createRecordingDialogEvent } from '../../../analytics/AnalyticsEvents';
createRecordingDialogEvent, import { sendAnalytics } from '../../../analytics/functions';
sendAnalytics
// @ts-ignore
} from '../../../analytics';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
// @ts-ignore // @ts-ignore
import { ColorSchemeRegistry } from '../../../base/color-scheme'; import { ColorSchemeRegistry } from '../../../base/color-scheme';

View File

@ -5,8 +5,8 @@ import rtcstatsInit from '@jitsi/rtcstats/rtcstats';
// @ts-ignore // @ts-ignore
import traceInit from '@jitsi/rtcstats/trace-ws'; import traceInit from '@jitsi/rtcstats/trace-ws';
// @ts-ignore import { createRTCStatsTraceCloseEvent } from '../analytics/AnalyticsEvents';
import { createRTCStatsTraceCloseEvent, sendAnalytics } from '../analytics'; import { sendAnalytics } from '../analytics/functions';
import logger from './logger'; import logger from './logger';
import { import {

View File

@ -2,8 +2,7 @@
// @ts-ignore // @ts-ignore
import { jitsiLocalStorage } from '@jitsi/js-utils'; import { jitsiLocalStorage } from '@jitsi/js-utils';
// @ts-ignore import { getAmplitudeIdentity } from '../analytics/functions';
import { getAmplitudeIdentity } from '../analytics';
import { import {
getConferenceOptions, getConferenceOptions,
getAnalyticsRoomName getAnalyticsRoomName

View File

@ -4,11 +4,8 @@ import { WithTranslation } from 'react-i18next';
// @ts-ignore // @ts-ignore
import UIEvents from '../../../../../service/UI/UIEvents'; import UIEvents from '../../../../../service/UI/UIEvents';
import { import { createProfilePanelButtonEvent } from '../../../analytics/AnalyticsEvents';
sendAnalytics, import { sendAnalytics } from '../../../analytics/functions';
createProfilePanelButtonEvent
// @ts-ignore
} from '../../../analytics';
// @ts-ignore // @ts-ignore
import { AbstractDialogTab } from '../../../base/dialog'; import { AbstractDialogTab } from '../../../base/dialog';
// @ts-ignore // @ts-ignore

View File

@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
import { View } from 'react-native'; import { View } from 'react-native';
import { useDispatch, useSelector } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux';
// @ts-ignore import { createBreakoutRoomsEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { createBreakoutRoomsEvent, createToolbarEvent, sendAnalytics } from '../../../analytics'; import { sendAnalytics } from '../../../analytics/functions';
// @ts-ignore // @ts-ignore
import { appNavigate } from '../../../app/actions'; import { appNavigate } from '../../../app/actions';
// @ts-ignore // @ts-ignore

View File

@ -3,8 +3,8 @@ import InlineDialog from '@atlaskit/inline-dialog';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
// @ts-ignore import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { createToolbarEvent, sendAnalytics } from '../../../analytics'; import { sendAnalytics } from '../../../analytics/functions';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import HangupToggleButton from './HangupToggleButton'; import HangupToggleButton from './HangupToggleButton';

View File

@ -3,8 +3,8 @@ import React, { useCallback } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
// @ts-ignore import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { createToolbarEvent, sendAnalytics } from '../../../analytics'; import { sendAnalytics } from '../../../analytics/functions';
// @ts-ignore // @ts-ignore
import { leaveConference } from '../../../base/conference/actions'; import { leaveConference } from '../../../base/conference/actions';
import Button from '../../../base/ui/components/web/Button'; import Button from '../../../base/ui/components/web/Button';

View File

@ -4,8 +4,8 @@ import { withStyles } from '@material-ui/styles';
import React, { Component, ReactElement } from 'react'; import React, { Component, ReactElement } from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
// @ts-ignore import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { createToolbarEvent, sendAnalytics } from '../../../analytics'; import { sendAnalytics } from '../../../analytics/functions';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
import { translate } from '../../../base/i18n/functions'; import { translate } from '../../../base/i18n/functions';
import { connect } from '../../../base/redux/functions'; import { connect } from '../../../base/redux/functions';

View File

@ -6,13 +6,8 @@ import { batch } from 'react-redux';
// @ts-ignore // @ts-ignore
import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut'; import keyboardShortcut from '../../../../../modules/keyboardshortcut/keyboardshortcut';
import { import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents';
ACTION_SHORTCUT_TRIGGERED, import { sendAnalytics } from '../../../analytics/functions';
createShortcutEvent,
createToolbarEvent,
sendAnalytics
// @ts-ignore
} from '../../../analytics';
import { IState } from '../../../app/types'; import { IState } from '../../../app/types';
import ContextMenu from '../../../base/components/context-menu/ContextMenu'; import ContextMenu from '../../../base/components/context-menu/ContextMenu';
import ContextMenuItemGroup from '../../../base/components/context-menu/ContextMenuItemGroup'; import ContextMenuItemGroup from '../../../base/components/context-menu/ContextMenuItemGroup';
@ -1092,6 +1087,7 @@ class Toolbox extends Component<Props> {
_onShortcutToggleChat() { _onShortcutToggleChat() {
sendAnalytics(createShortcutEvent( sendAnalytics(createShortcutEvent(
'toggle.chat', 'toggle.chat',
ACTION_SHORTCUT_TRIGGERED,
{ {
enable: !this.props._chatOpen enable: !this.props._chatOpen
})); }));
@ -1116,6 +1112,7 @@ class Toolbox extends Component<Props> {
_onShortcutToggleParticipantsPane() { _onShortcutToggleParticipantsPane() {
sendAnalytics(createShortcutEvent( sendAnalytics(createShortcutEvent(
'toggle.participants-pane', 'toggle.participants-pane',
ACTION_SHORTCUT_TRIGGERED,
{ {
enable: !this.props._participantsPaneOpen enable: !this.props._participantsPaneOpen
})); }));
@ -1145,6 +1142,7 @@ class Toolbox extends Component<Props> {
_onShortcutToggleTileView() { _onShortcutToggleTileView() {
sendAnalytics(createShortcutEvent( sendAnalytics(createShortcutEvent(
'toggle.tileview', 'toggle.tileview',
ACTION_SHORTCUT_TRIGGERED,
{ {
enable: !this.props._tileViewEnabled enable: !this.props._tileViewEnabled
})); }));
@ -1162,6 +1160,7 @@ class Toolbox extends Component<Props> {
_onShortcutToggleFullScreen() { _onShortcutToggleFullScreen() {
sendAnalytics(createShortcutEvent( sendAnalytics(createShortcutEvent(
'toggle.fullscreen', 'toggle.fullscreen',
ACTION_SHORTCUT_TRIGGERED,
{ {
enable: !this.props._fullScreen enable: !this.props._fullScreen
})); }));
@ -1307,7 +1306,6 @@ class Toolbox extends Component<Props> {
_onToolbarToggleScreenshare() { _onToolbarToggleScreenshare() {
sendAnalytics(createToolbarEvent( sendAnalytics(createToolbarEvent(
'toggle.screen.sharing', 'toggle.screen.sharing',
ACTION_SHORTCUT_TRIGGERED,
{ enable: !this.props._screenSharing })); { enable: !this.props._screenSharing }));
this._closeOverflowMenuIfOpen(); this._closeOverflowMenuIfOpen();

View File

@ -5,8 +5,8 @@ import React, { Component } from 'react';
import { WithTranslation } from 'react-i18next'; import { WithTranslation } from 'react-i18next';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
// @ts-ignore import { createToolbarEvent } from '../../analytics/AnalyticsEvents';
import { createToolbarEvent, sendAnalytics } from '../../analytics'; import { sendAnalytics } from '../../analytics/functions';
import { IState } from '../../app/types'; import { IState } from '../../app/types';
// @ts-ignore // @ts-ignore
import { setAudioOnly } from '../../base/audio-only'; import { setAudioOnly } from '../../base/audio-only';