Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

ref(TS) Changes types to interfaces (#13141)

Robert Pintilii6afb7ba9a6d6
diff --git a/react/features/app/components/AbstractApp.ts b/react/features/app/components/AbstractApp.ts
index d96bf02b62..fc2bfea6a9 100644
--- a/react/features/app/components/AbstractApp.ts
+++ b/react/features/app/components/AbstractApp.ts
@@ -6,7 +6,7 @@ import { getDefaultURL } from '../functions';
/**
* The type of React {@code Component} props of {@link AbstractApp}.
*/
-export type Props = {
+export interface IProps {
/**
* XXX Refer to the implementation of loadURLObject: in
@@ -18,14 +18,14 @@ export type Props = {
* The URL, if any, with which the app was launched.
*/
url: Object | string;
-};
+}
/**
* Base (abstract) class for main App component.
*
* @abstract
*/
-export class AbstractApp extends BaseApp<Props> {
+export class AbstractApp extends BaseApp<IProps> {
/**
* The deferred for the initialisation {{promise, resolve, reject}}.
*/
@@ -51,7 +51,7 @@ export class AbstractApp extends BaseApp<Props> {
*
* @inheritdoc
*/
- async componentDidUpdate(prevProps: Props) {
+ async componentDidUpdate(prevProps: IProps) {
const previousUrl = toURLString(prevProps.url);
const currentUrl = toURLString(this.props.url);
const previousTimestamp = prevProps.timestamp;
diff --git a/react/features/base/app/components/BaseApp.tsx b/react/features/base/app/components/BaseApp.tsx
index edd05c2a60..7fbf44c4ea 100644
--- a/react/features/base/app/components/BaseApp.tsx
+++ b/react/features/base/app/components/BaseApp.tsx
@@ -23,7 +23,7 @@ import logger from '../logger';
/**
* The type of the React {@code Component} state of {@link BaseApp}.
*/
-type State = {
+interface IState {
/**
* The {@code Route} rendered by the {@code BaseApp}.
@@ -37,14 +37,14 @@ type State = {
* The redux store used by the {@code BaseApp}.
*/
store?: IStore;
-};
+}
/**
* Base (abstract) class for main App component.
*
* @abstract
*/
-export default class BaseApp<P> extends Component<P, State> {
+export default class BaseApp<P> extends Component<P, IState> {
/**
* The deferred for the initialisation {{promise, resolve, reject}}.
*/
diff --git a/react/features/base/avatar/components/Avatar.tsx b/react/features/base/avatar/components/Avatar.tsx
index 944e748cde..2ed00b1ecd 100644
--- a/react/features/base/avatar/components/Avatar.tsx
+++ b/react/features/base/avatar/components/Avatar.tsx
@@ -94,17 +94,17 @@ export interface IProps {
useCORS?: boolean;
}
-type State = {
+interface IState {
avatarFailed: boolean;
isUsingCORS: boolean;
-};
+}
export const DEFAULT_SIZE = 65;
/**
* Implements a class to render avatars in the app.
*/
-class Avatar<P extends IProps> extends PureComponent<P, State> {
+class Avatar<P extends IProps> extends PureComponent<P, IState> {
/**
* Default values for {@code Avatar} component's properties.
*
diff --git a/react/features/base/dialog/components/native/AbstractDialog.ts b/react/features/base/dialog/components/native/AbstractDialog.ts
index 170c6c3a62..e602ac66fb 100644
--- a/react/features/base/dialog/components/native/AbstractDialog.ts
+++ b/react/features/base/dialog/components/native/AbstractDialog.ts
@@ -7,25 +7,25 @@ import { DialogProps } from '../../constants';
/**
* The type of the React {@code Component} props of {@link AbstractDialog}.
*/
-export type Props = DialogProps & {
+export interface IProps extends DialogProps {
/**
* Used to show/hide the dialog on cancel.
*/
dispatch: IStore['dispatch'];
-};
+}
/**
* The type of the React {@code Component} state of {@link AbstractDialog}.
*/
-export type State = {
+export interface IState {
submitting?: boolean;
-};
+}
/**
* An abstract implementation of a dialog on Web/React and mobile/react-native.
*/
-export default class AbstractDialog<P extends Props, S extends State>
+export default class AbstractDialog<P extends IProps, S extends IState>
extends Component<P, S> {
_mounted: boolean;
diff --git a/react/features/base/media/components/AbstractAudio.ts b/react/features/base/media/components/AbstractAudio.ts
index 61d8a8e020..adb7a8eec6 100644
--- a/react/features/base/media/components/AbstractAudio.ts
+++ b/react/features/base/media/components/AbstractAudio.ts
@@ -17,7 +17,7 @@ export type AudioElement = {
/**
* {@code AbstractAudio} Component's property types.
*/
-type Props = {
+interface IProps {
loop?: boolean;
@@ -37,13 +37,13 @@ type Props = {
*/
src: Object | string;
stream?: Object;
-};
+}
/**
* The React {@link Component} which is similar to Web's
* {@code HTMLAudioElement}.
*/
-export default class AbstractAudio extends Component<Props> {
+export default class AbstractAudio extends Component<IProps> {
/**
* The {@link AudioElement} instance which implements the audio playback
* functionality.
@@ -53,10 +53,10 @@ export default class AbstractAudio extends Component<Props> {
/**
* Initializes a new {@code AbstractAudio} instance.
*
- * @param {Props} props - The read-only properties with which the new
+ * @param {IProps} props - The read-only properties with which the new
* instance is to be initialized.
*/
- constructor(props: Props) {
+ constructor(props: IProps) {
super(props);
// Bind event handlers so they are only bound once per instance.
diff --git a/react/features/base/media/components/AbstractVideoTrack.tsx b/react/features/base/media/components/AbstractVideoTrack.tsx
index c5782839e3..0f9a6e1d2f 100644
--- a/react/features/base/media/components/AbstractVideoTrack.tsx
+++ b/react/features/base/media/components/AbstractVideoTrack.tsx
@@ -10,7 +10,7 @@ import { Video } from './_';
/**
* The type of the React {@code Component} props of {@link AbstractVideoTrack}.
*/
-export type Props = {
+export interface IProps {
/**
* The Redux dispatch function.
@@ -45,7 +45,7 @@ export type Props = {
* Indicates whether zooming (pinch to zoom and/or drag) is enabled.
*/
zoomEnabled?: boolean;
-};
+}
/**
* Implements a React {@link Component} that renders video element for a
@@ -53,7 +53,7 @@ export type Props = {
*
* @abstract
*/
-export default class AbstractVideoTrack<P extends Props> extends Component<P> {
+export default class AbstractVideoTrack<P extends IProps> extends Component<P> {
/**
* Initializes a new AbstractVideoTrack instance.
*
diff --git a/react/features/base/media/components/native/VideoTransform.tsx b/react/features/base/media/components/native/VideoTransform.tsx
index 6b962e1568..c662122965 100644
--- a/react/features/base/media/components/native/VideoTransform.tsx
+++ b/react/features/base/media/components/native/VideoTransform.tsx
@@ -61,7 +61,7 @@ type Transform = {
translateY: number;
};
-type Props = {
+interface IProps {
/**
* The current aspect ratio of the screen.
@@ -103,9 +103,9 @@ type Props = {
* Style of the top level transformable view.
*/
style: Object;
-};
+}
-type State = {
+interface IState {
/**
* The current (non-transformed) layout of the View.
@@ -116,12 +116,12 @@ type State = {
* The current transform that is applied.
*/
transform: Transform;
-};
+}
/**
* An container that captures gestures such as pinch&zoom, touch or move.
*/
-class VideoTransform extends Component<Props, State> {
+class VideoTransform extends Component<IProps, IState> {
/**
* The gesture handler object.
*/
@@ -155,7 +155,7 @@ class VideoTransform extends Component<Props, State> {
*
* @inheritdoc
*/
- constructor(props: Props) {
+ constructor(props: IProps) {
super(props);
this.state = {
@@ -198,7 +198,7 @@ class VideoTransform extends Component<Props, State> {
*
* @inheritdoc
*/
- componentDidUpdate(prevProps: Props, prevState: State) {
+ componentDidUpdate(prevProps: IProps, prevState: IState) {
if (prevProps.streamId !== this.props.streamId) {
this._storeTransform(prevProps.streamId, prevState.transform);
this._restoreTransform(this.props.streamId);
diff --git a/react/features/base/react/components/AbstractContainer.ts b/react/features/base/react/components/AbstractContainer.ts
index 9ef32886a8..9911b25c7f 100644
--- a/react/features/base/react/components/AbstractContainer.ts
+++ b/react/features/base/react/components/AbstractContainer.ts
@@ -5,7 +5,7 @@ import { getFixedPlatformStyle } from '../../styles/functions';
/**
* {@code AbstractContainer} Component's property types.
*/
-export type Props = {
+export interface IProps {
/**
* An optional accessibility label to apply to the container root.
@@ -61,7 +61,7 @@ export type Props = {
* all.
*/
visible?: boolean;
-};
+}
/**
* Abstract (base) class for container of React {@link Component} children with
@@ -69,7 +69,7 @@ export type Props = {
*
* @augments Component
*/
-export default class AbstractContainer<P extends Props> extends Component<P> {
+export default class AbstractContainer<P extends IProps> extends Component<P> {
/**
* Renders this {@code AbstractContainer} as a React {@code Component} of a
* specific type.
diff --git a/react/features/base/react/components/web/Container.ts b/react/features/base/react/components/web/Container.ts
index 3649a9e887..a76098151d 100644
--- a/react/features/base/react/components/web/Container.ts
+++ b/react/features/base/react/components/web/Container.ts
@@ -1,11 +1,11 @@
-import AbstractContainer, { Props } from '../AbstractContainer';
+import AbstractContainer, { IProps } from '../AbstractContainer';
/**
* Represents a container of React/Web {@link Component} children with a style.
*
* @augments AbstractContainer
*/
-export default class Container<P extends Props> extends AbstractContainer<P> {
+export default class Container<P extends IProps> extends AbstractContainer<P> {
/**
* Implements React's {@link Component#render()}.
*
diff --git a/react/features/base/react/components/web/Message.tsx b/react/features/base/react/components/web/Message.tsx
index 81a013309d..4edaa412f8 100644
--- a/react/features/base/react/components/web/Message.tsx
+++ b/react/features/base/react/components/web/Message.tsx
@@ -7,25 +7,25 @@ import { isGifMessage } from '../../../../gifs/functions.web';
import Linkify from './Linkify';
-type Props = {
+interface IProps {
/**
* The body of the message.
*/
text: string;
-};
+}
/**
* Renders the content of a chat message.
*/
-class Message extends Component<Props> {
+class Message extends Component<IProps> {
/**
* Initializes a new {@code Message} instance.
*
- * @param {Props} props - The props of the component.
+ * @param {IProps} props - The props of the component.
* @inheritdoc
*/
- constructor(props: Props) {
+ constructor(props: IProps) {
super(props);
// Bind event handlers so they are only bound once for every instance
diff --git a/react/features/conference/components/AbstractInsecureRoomNameLabel.tsx b/react/features/conference/components/AbstractInsecureRoomNameLabel.tsx
index e7564fc3b0..220a64d559 100644
--- a/react/features/conference/components/AbstractInsecureRoomNameLabel.tsx
+++ b/react/features/conference/components/AbstractInsecureRoomNameLabel.tsx
@@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
import { IReduxState } from '../../app/types';
import isInsecureRoomName from '../../base/util/isInsecureRoomName';
-type Props = {
+interface IProps {
/**
* True of the label should be visible.
@@ -14,12 +14,12 @@ type Props = {
* Function to be used to translate i18n labels.
*/
t: Function;
-};
+}
/**
* Abstract class for the {@Code InsecureRoomNameLabel} component.
*/
-export default class AbstractInsecureRoomNameLabel extends PureComponent<Props> {
+export default class AbstractInsecureRoomNameLabel extends PureComponent<IProps> {
/**
* Implements {@code Component#render}.
*
@@ -47,7 +47,7 @@ export default class AbstractInsecureRoomNameLabel extends PureComponent<Props>
* Maps part of the Redux state to the props of this component.
*
* @param {Object} state - The Redux state.
- * @returns {Props}
+ * @returns {IProps}
*/
export function _mapStateToProps(state: IReduxState) {
const { locked, room } = state['features/base/conference'];
diff --git a/react/features/conference/components/native/LonelyMeetingExperience.tsx b/react/features/conference/components/native/LonelyMeetingExperience.tsx
index 01ef4eb4a9..42da390d90 100644
--- a/react/features/conference/components/native/LonelyMeetingExperience.tsx
+++ b/react/features/conference/components/native/LonelyMeetingExperience.tsx
@@ -24,7 +24,7 @@ import styles from './styles';
/**
* Props type of the component.
*/
-type Props = WithTranslation & {
+interface IProps extends WithTranslation {
/**
* Control for invite other button.
@@ -50,23 +50,18 @@ type Props = WithTranslation & {
* The Redux Dispatch function.
*/
dispatch: Function;
-
- /**
- * Function to be used to translate i18n labels.
- */
- t: Function;
-};
+}
/**
* Implements the UI elements to be displayed in the lonely meeting experience.
*/
-class LonelyMeetingExperience extends PureComponent<Props> {
+class LonelyMeetingExperience extends PureComponent<IProps> {
/**
* Instantiates a new component.
*
* @inheritdoc
*/
- constructor(props: Props) {
+ constructor(props: IProps) {
super(props);
this._onPress = this._onPress.bind(this);
@@ -131,7 +126,7 @@ class LonelyMeetingExperience extends PureComponent<Props> {
*
* @param {Object} state - The redux state.
* @private
- * @returns {Props}
+ * @returns {IProps}
*/
function _mapStateToProps(state: IReduxState) {
const { disableInviteFunctions } = state['features/base/config'];
diff --git a/react/features/device-selection/components/AudioDevicesSelection.web.tsx b/react/features/device-selection/components/AudioDevicesSelection.web.tsx
index 573605897f..37af8b41da 100644
--- a/react/features/device-selection/components/AudioDevicesSelection.web.tsx
+++ b/react/features/device-selection/components/AudioDevicesSelection.web.tsx
@@ -111,13 +111,13 @@ interface IProps extends AbstractDialogTabProps, WithTranslation {
/**
* The type of the React {@code Component} state of {@link AudioDevicesSelection}.
*/
-type State = {
+interface IState {
/**
* The JitsiTrack to use for previewing audio input.
*/
previewAudioTrack?: any | null;
-};
+}
const styles = (theme: Theme) => {
return {
@@ -153,7 +153,7 @@ const styles = (theme: Theme) => {
*
* @augments Component
*/
-class AudioDevicesSelection extends AbstractDialogTab<IProps, State> {
+class AudioDevicesSelection extends AbstractDialogTab<IProps, IState> {
/**
* Whether current component is mounted or not.
diff --git a/react/features/device-selection/components/VideoDeviceSelection.web.tsx b/react/features/device-selection/components/VideoDeviceSelection.web.tsx
index 4e593682f2..2ee7321ba7 100644
--- a/react/features/device-selection/components/VideoDeviceSelection.web.tsx
+++ b/react/features/device-selection/components/VideoDeviceSelection.web.tsx
@@ -91,7 +91,7 @@ export interface IProps extends AbstractDialogTabProps, WithTranslation {
/**
* The type of the React {@code Component} state of {@link VideoDeviceSelection}.
*/
-type State = {
+interface IState {
/**
* The JitsiTrack to use for previewing video input.
@@ -102,7 +102,7 @@ type State = {
* The error message from trying to use a video input device.
*/
previewVideoTrackError: string | null;
-};
+}
const styles = (theme: Theme) => {
return {
@@ -124,7 +124,7 @@ const styles = (theme: Theme) => {
*
* @augments Component
*/
-class VideoDeviceSelection extends AbstractDialogTab<IProps, State> {
+class VideoDeviceSelection extends AbstractDialogTab<IProps, IState> {
/**
* Whether current component is mounted or not.
diff --git a/react/features/feedback/components/FeedbackDialog.web.tsx b/react/features/feedback/components/FeedbackDialog.web.tsx
index c35f2253fa..f1530ba121 100644
--- a/react/features/feedback/components/FeedbackDialog.web.tsx
+++ b/react/features/feedback/components/FeedbackDialog.web.tsx
@@ -134,7 +134,7 @@ interface IProps extends WithTranslation {
/**
* The type of the React {@code Component} state of {@link FeedbackDialog}.
*/
-type State = {
+interface IState {
/**
* The currently entered feedback message.
@@ -153,7 +153,7 @@ type State = {
* indexed so subtract one to map with SCORES.
*/
score: number;
-};
+}
/**
* A React {@code Component} for displaying a dialog to rate the current
@@ -162,7 +162,7 @@ type State = {
*
* @augments Component
*/
-class FeedbackDialog extends Component<IProps, State> {
+class FeedbackDialog extends Component<IProps, IState> {
/**
* An array of objects with click handlers for each of the scores listed in
* the constant SCORES. This pattern is used for binding event handlers only
diff --git a/react/features/filmstrip/components/web/ModeratorIndicator.tsx b/react/features/filmstrip/components/web/ModeratorIndicator.tsx
index 4b75a79e7c..eeb89d4443 100644
--- a/react/features/filmstrip/components/web/ModeratorIndicator.tsx
+++ b/react/features/filmstrip/components/web/ModeratorIndicator.tsx
@@ -8,20 +8,20 @@ import { BaseIndicator } from '../../../base/react';
/**
* The type of the React {@code Component} props of {@link ModeratorIndicator}.
*/
-type Props = {
+interface IProps {
/**
* From which side of the indicator the tooltip should appear from.
*/
tooltipPosition: string;
-};
+}
/**
* React {@code Component} for showing a moderator icon with a tooltip.
*
* @returns {JSX.Element}
*/
-const ModeratorIndicator = ({ tooltipPosition }: Props): JSX.Element => (
+const ModeratorIndicator = ({ tooltipPosition }: IProps): JSX.Element => (
<BaseIndicator
icon = { IconModerator }
iconSize = { 16 }
diff --git a/react/features/filmstrip/components/web/ThumbnailWrapper.tsx b/react/features/filmstrip/components/web/ThumbnailWrapper.tsx
index a6196c9e78..e932060072 100644
--- a/react/features/filmstrip/components/web/ThumbnailWrapper.tsx
+++ b/react/features/filmstrip/components/web/ThumbnailWrapper.tsx
@@ -15,7 +15,7 @@ import Thumbnail from './Thumbnail';
/**
* The type of the React {@code Component} props of {@link ThumbnailWrapper}.
*/
-type Props = {
+interface IProps {
/**
* Whether or not to hide the self view.
@@ -67,21 +67,21 @@ type Props = {
* The styles coming from react-window.
*/
style: Object;
-};
+}
/**
* A wrapper Component for the Thumbnail that translates the react-window specific props
* to the Thumbnail Component's props.
*/
-class ThumbnailWrapper extends Component<Props> {
+class ThumbnailWrapper extends Component<IProps> {
shouldComponentUpdate: (p: any, s: any) => boolean;
/**
* Creates new ThumbnailWrapper instance.
*
- * @param {Props} props - The props of the component.
+ * @param {IProps} props - The props of the component.
*/
- constructor(props: Props) {
+ constructor(props: IProps) {
super(props);
this.shouldComponentUpdate = shouldComponentUpdate.bind(this);
@@ -146,7 +146,7 @@ class ThumbnailWrapper extends Component<Props> {
* @param {Object} state - The Redux state.
* @param {Object} ownProps - The props passed to the component.
* @private
- * @returns {Props}
+ * @returns {IProps}
*/
function _mapStateToProps(state: IReduxState, ownProps: { columnIndex: number;
data: { filmstripType: string; }; index?: number; rowIndex: number; }) {
diff --git a/react/features/lobby/components/AbstractLobbyScreen.tsx b/react/features/lobby/components/AbstractLobbyScreen.tsx
index e641e24180..7e65d842f8 100644
--- a/react/features/lobby/components/AbstractLobbyScreen.tsx
+++ b/react/features/lobby/components/AbstractLobbyScreen.tsx
@@ -19,7 +19,7 @@ export const SCREEN_STATES = {
VIEW: 3
};
-export type Props = {
+export interface IProps {
/**
* Indicates whether the device status should be visible.
@@ -95,9 +95,9 @@ export type Props = {
* Function to be used to translate i18n labels.
*/
t: Function;
-};
+}
-type State = {
+interface IState {
/**
* The display name value entered into the field.
@@ -128,12 +128,12 @@ type State = {
* The state of the screen. One of {@code SCREEN_STATES[*]}.
*/
screenState: number;
-};
+}
/**
* Abstract class to encapsulate the platform common code of the {@code LobbyScreen}.
*/
-export default class AbstractLobbyScreen<P extends Props = Props> extends PureComponent<P, State> {
+export default class AbstractLobbyScreen<P extends IProps = IProps> extends PureComponent<P, IState> {
/**
* Instantiates a new component.
*
@@ -169,7 +169,7 @@ export default class AbstractLobbyScreen<P extends Props = Props> extends PureCo
*
* @inheritdoc
*/
- static getDerivedStateFromProps(props: Props, state: State) {
+ static getDerivedStateFromProps(props: IProps, state: IState) {
if (props._passwordJoinFailed && !state.passwordJoinFailed) {
return {
password: '',
@@ -415,7 +415,7 @@ export default class AbstractLobbyScreen<P extends Props = Props> extends PureCo
* Maps part of the Redux state to the props of this component.
*
* @param {Object} state - The Redux state.
- * @returns {Props}
+ * @returns {IProps}
*/
export function _mapStateToProps(state: IReduxState) {
const localParticipant = getLocalParticipant(state);
diff --git a/react/features/mobile/navigation/components/RootNavigationContainer.tsx b/react/features/mobile/navigation/components/RootNavigationContainer.tsx
index a8177eab7c..604af28963 100644
--- a/react/features/mobile/navigation/components/RootNavigationContainer.tsx
+++ b/react/features/mobile/navigation/components/RootNavigationContainer.tsx
@@ -37,7 +37,7 @@ import ConferenceNavigationContainer
const RootStack = createStackNavigator();
-type Props = {
+interface IProps {
/**
* Redux dispatch function.
@@ -48,10 +48,10 @@ type Props = {
* Is welcome page available?
*/
isWelcomePageAvailable: boolean;
-};
+}
-const RootNavigationContainer = ({ dispatch, isWelcomePageAvailable }: Props) => {
+const RootNavigationContainer = ({ dispatch, isWelcomePageAvailable }: IProps) => {
const initialRouteName = isWelcomePageAvailable
? screen.welcome.main : screen.connecting;
const onReady = useCallback(() => {
@@ -108,7 +108,7 @@ const RootNavigationContainer = ({ dispatch, isWelcomePageAvailable }: Props) =>
* Maps part of the Redux store to the props of this component.
*
* @param {Object} state - The Redux state.
- * @returns {Props}
+ * @returns {IProps}
*/
function mapStateToProps(state: IReduxState) {
return {
diff --git a/react/features/overlay/components/web/AbstractSuspendedOverlay.ts b/react/features/overlay/components/web/AbstractSuspendedOverlay.ts
index 2e72b0005c..e2351ec4b7 100644
--- a/react/features/overlay/components/web/AbstractSuspendedOverlay.ts
+++ b/react/features/overlay/components/web/AbstractSuspendedOverlay.ts
@@ -3,17 +3,11 @@ import { WithTranslation } from 'react-i18next';
import { IReduxState } from '../../../app/types';
-/**
- * The type of the React {@code Component} props of
- * {@link AbstractSuspendedOverlay}.
- */
-type Props = WithTranslation;
-
/**
* Implements a React {@link Component} for suspended overlay. Shown when a
* suspend is detected.
*/
-export default class AbstractSuspendedOverlay extends Component<Props> {
+export default class AbstractSuspendedOverlay extends Component<WithTranslation> {
/**
* Determines whether this overlay needs to be rendered (according to a
* specific redux state). Called by {@link OverlayContainer}.
diff --git a/react/features/overlay/components/web/OverlayContainer.tsx b/react/features/overlay/components/web/OverlayContainer.tsx
index 9e94624bd8..d023f6ca29 100644
--- a/react/features/overlay/components/web/OverlayContainer.tsx
+++ b/react/features/overlay/components/web/OverlayContainer.tsx
@@ -8,20 +8,20 @@ import { getOverlayToRender } from '../../functions.web';
/**
* The type of the React {@link Component} props of {@code OverlayContainer}.
*/
-type Props = {
+interface IProps {
/**
* The React {@link Component} type of overlay to be rendered by the
* associated {@code OverlayContainer}.
*/
overlay: any;
-};
+}
/**
* Implements a React {@link Component} that will display the correct overlay
* when needed.
*/
-class OverlayContainer extends Component<Props> {
+class OverlayContainer extends Component<IProps> {
/**
* Implements React's {@link Component#render()}.
*
diff --git a/react/features/overlay/components/web/OverlayFrame.tsx b/react/features/overlay/components/web/OverlayFrame.tsx
index 7f4ccc9ad1..12b3b10552 100644
--- a/react/features/overlay/components/web/OverlayFrame.tsx
+++ b/react/features/overlay/components/web/OverlayFrame.tsx
@@ -3,7 +3,7 @@ import React, { Component, ReactChildren } from 'react';
/**
* The type of the React {@code Component} props of {@link OverlayFrame}.
*/
-type Props = {
+interface IProps {
/**
* The children components to be displayed into the overlay frame.
@@ -20,12 +20,12 @@ type Props = {
* The style property.
*/
style: Object;
-};
+}
/**
* Implements a React {@link Component} for the frame of the overlays.
*/
-export default class OverlayFrame extends Component<Props> {
+export default class OverlayFrame extends Component<IProps> {
/**
* Implements React's {@link Component#render()}.
*
diff --git a/react/features/participants-pane/components/native/MeetingParticipantList.tsx b/react/features/participants-pane/components/native/MeetingParticipantList.tsx
index 7ff90722a1..8eaf9b9338 100644
--- a/react/features/participants-pane/components/native/MeetingParticipantList.tsx
+++ b/react/features/participants-pane/components/native/MeetingParticipantList.tsx
@@ -31,7 +31,7 @@ import MeetingParticipantItem from './MeetingParticipantItem';
import styles from './styles';
-type Props = WithTranslation & {
+interface IProps extends WithTranslation {
/**
* Current breakout room, if we are in one.
@@ -102,24 +102,19 @@ type Props = WithTranslation & {
* Function to update the search string.
*/
setSearchString: Function;
-
- /**
- * Translation function.
- */
- t: Function;
-};
+}
/**
* The meeting participant list component.
*/
-class MeetingParticipantList extends PureComponent<Props> {
+class MeetingParticipantList extends PureComponent<IProps> {
/**
* Creates new MeetingParticipantList instance.
*
- * @param {Props} props - The props of the component.
+ * @param {IProps} props - The props of the component.
*/
- constructor(props: Props) {
+ constructor(props: IProps) {
super(props);
this._keyExtractor = this._keyExtractor.bind(this);
@@ -279,7 +274,7 @@ class MeetingParticipantList extends PureComponent<Props> {
*
* @param {Object} state - The Redux state.
* @private
- * @returns {Props}
+ * @returns {IProps}
*/
function _mapStateToProps(state: IReduxState): Object {
const _participantsCount = getParticipantCountWithFake(state);
diff --git a/react/features/recent-list/components/AbstractRecentList.tsx b/react/features/recent-list/components/AbstractRecentList.tsx
index 06234d358e..cc4244a32a 100644
--- a/react/features/recent-list/components/AbstractRecentList.tsx
+++ b/react/features/recent-list/components/AbstractRecentList.tsx
@@ -18,7 +18,7 @@ import styles from './styles';
/**
* The type of the React {@code Component} props of {@link AbstractRecentList}.
*/
-type Props = {
+interface IProps {
/**
* The redux store's {@code dispatch} function.
@@ -29,13 +29,13 @@ type Props = {
* The translate function.
*/
t: Function;
-};
+}
/**
* An abstract component for the recent list.
*
*/
-export default class AbstractRecentList<P extends Props> extends AbstractPage<P> {
+export default class AbstractRecentList<P extends IProps> extends AbstractPage<P> {
/**
* Initializes a new {@code RecentList} instance.
*
diff --git a/react/features/room-lock/components/PasswordRequiredPrompt.web.tsx b/react/features/room-lock/components/PasswordRequiredPrompt.web.tsx
index 58e042d125..5be8fe9d76 100644
--- a/react/features/room-lock/components/PasswordRequiredPrompt.web.tsx
+++ b/react/features/room-lock/components/PasswordRequiredPrompt.web.tsx
@@ -31,19 +31,19 @@ interface IProps extends WithTranslation {
* The type of the React {@code Component} state of
* {@link PasswordRequiredPrompt}.
*/
-type State = {
+interface IState {
/**
* The password entered by the local participant.
*/
password?: string;
-};
+}
/**
* Implements a React Component which prompts the user when a password is
* required to join a conference.
*/
-class PasswordRequiredPrompt extends Component<IProps, State> {
+class PasswordRequiredPrompt extends Component<IProps, IState> {
state = {
password: ''
};
diff --git a/react/features/security/components/security-dialog/web/SecurityDialogButton.ts b/react/features/security/components/security-dialog/web/SecurityDialogButton.ts
index 076f92d433..fd95b76a30 100644
--- a/react/features/security/components/security-dialog/web/SecurityDialogButton.ts
+++ b/react/features/security/components/security-dialog/web/SecurityDialogButton.ts
@@ -7,12 +7,10 @@ import AbstractSecurityDialogButton, {
_mapStateToProps as _abstractMapStateToProps
} from '../AbstractSecurityDialogButton';
-type Props = AbstractSecurityDialogButtonProps;
-
/**
* Implements an {@link AbstractSecurityDialogButton} to open the security dialog.
*/
-class SecurityDialogButton<P extends Props, S> extends AbstractSecurityDialogButton<P, S> {
+class SecurityDialogButton<P extends AbstractSecurityDialogButtonProps, S> extends AbstractSecurityDialogButton<P, S> {
/**
* Opens / closes the security dialog.
diff --git a/react/features/settings/components/web/audio/AudioSettingsContent.tsx b/react/features/settings/components/web/audio/AudioSettingsContent.tsx
index 843e0d965c..6594893411 100644
--- a/react/features/settings/components/web/audio/AudioSettingsContent.tsx
+++ b/react/features/settings/components/web/audio/AudioSettingsContent.tsx
@@ -90,14 +90,14 @@ export interface IProps extends WithTranslation {
toggleSuppression: () => void;
}
-type State = {
+interface IState {
/**
* An list of objects, each containing the microphone label, audio track, device id
* and track error if the case.
*/
audioTracks: Array<{ deviceId: string; hasError: boolean; jitsiTrack: any; label: string; }>;
-};
+}
/**
* Implements a React {@link Component} which displays a list of all
@@ -105,7 +105,7 @@ type State = {
*
* @augments Component
*/
-class AudioSettingsContent extends Component<IProps, State> {
+class AudioSettingsContent extends Component<IProps, IState> {
_componentWasUnmounted: boolean;
microphoneHeaderId = 'microphone_settings_header';
speakerHeaderId = 'speaker_settings_header';
diff --git a/react/features/settings/components/web/audio/MicrophoneEntry.tsx b/react/features/settings/components/web/audio/MicrophoneEntry.tsx
index 789865e17d..86b88b7b24 100644
--- a/react/features/settings/components/web/audio/MicrophoneEntry.tsx
+++ b/react/features/settings/components/web/audio/MicrophoneEntry.tsx
@@ -13,7 +13,7 @@ import Meter from './Meter';
const JitsiTrackEvents = JitsiMeetJS.events.track;
-type Props = {
+interface IProps {
/**
* The text for this component.
@@ -67,30 +67,30 @@ type Props = {
* Click handler for component.
*/
onClick: Function;
-};
+}
-type State = {
+interface IState {
/**
* The audio level.
*/
level: number;
-};
+}
/**
* React {@code Component} representing an entry for the microphone audio settings.
*
- * @param {Props} props - The props of the component.
+ * @param {IProps} props - The props of the component.
* @returns { ReactElement}
*/
-export default class MicrophoneEntry extends Component<Props, State> {
+export default class MicrophoneEntry extends Component<IProps, IState> {
/**
* Initializes a new {@code MicrophoneEntry} instance.
*
* @param {Object} props - The read-only properties with which the new
* instance is to be initialized.
*/
- constructor(props: Props) {
+ constructor(props: IProps) {
super(props);
this.state = {
@@ -168,7 +168,7 @@ export default class MicrophoneEntry extends Component<Props, State> {
*
* @inheritdoc
*/
- componentDidUpdate(prevProps: Props) {
+ componentDidUpdate(prevProps: IProps) {
if (prevProps.jitsiTrack !== this.props.jitsiTrack) {
this._stopListening(prevProps.jitsiTrack);
this._startListening();
diff --git a/react/features/settings/components/web/video/VideoSettingsContent.tsx b/react/features/settings/components/web/video/VideoSettingsContent.tsx
index 4378f26084..907e76b05e 100644
--- a/react/features/settings/components/web/video/VideoSettingsContent.tsx
+++ b/react/features/settings/components/web/video/VideoSettingsContent.tsx
@@ -62,13 +62,13 @@ export interface IProps extends WithTranslation {
/**
* The type of the React {@code Component} state of {@link VideoSettingsContent}.
*/
-type State = {
+interface IState {
/**
* An array of all the jitsiTracks and eventual errors.
*/
trackData: { deviceId: string; error?: string; jitsiTrack: any | null; }[];
-};
+}
/**
* Implements a React {@link Component} which displays a list of video
@@ -76,7 +76,7 @@ type State = {
*
* @augments Component
*/
-class VideoSettingsContent extends Component<IProps, State> {
+class VideoSettingsContent extends Component<IProps, IState> {
_componentWasUnmounted: boolean;
/**
diff --git a/react/features/speaker-stats/components/AbstractSpeakerStatsButton.tsx b/react/features/speaker-stats/components/AbstractSpeakerStatsButton.tsx
index 8278615a36..f20ea1ae73 100644
--- a/react/features/speaker-stats/components/AbstractSpeakerStatsButton.tsx
+++ b/react/features/speaker-stats/components/AbstractSpeakerStatsButton.tsx
@@ -1,20 +1,10 @@
-import { IStore } from '../../app/types';
import { IconConnection } from '../../base/icons/svg';
import AbstractButton, { IProps as AbstractButtonProps } from '../../base/toolbox/components/AbstractButton';
-type Props = AbstractButtonProps & {
-
- /**
- * True if the navigation bar should be visible.
- */
- dispatch: IStore['dispatch'];
-};
-
-
/**
* Implementation of a button for opening speaker stats dialog.
*/
-class AbstractSpeakerStatsButton extends AbstractButton<Props> {
+class AbstractSpeakerStatsButton extends AbstractButton<AbstractButtonProps> {
accessibilityLabel = 'toolbar.accessibilityLabel.speakerStats';
icon = IconConnection;
label = 'toolbar.speakerStats';
diff --git a/react/features/speaker-stats/components/web/SpeakerStatsItem.tsx b/react/features/speaker-stats/components/web/SpeakerStatsItem.tsx
index 1d74d7a6ee..67697e5d79 100644
--- a/react/features/speaker-stats/components/web/SpeakerStatsItem.tsx
+++ b/react/features/speaker-stats/components/web/SpeakerStatsItem.tsx
@@ -13,7 +13,7 @@ import Timeline from './Timeline';
/**
* The type of the React {@code Component} props of {@link SpeakerStatsItem}.
*/
-type Props = {
+interface IProps {
/**
* The name of the participant.
@@ -60,9 +60,9 @@ type Props = {
* Invoked to obtain translated strings.
*/
t: Function;
-};
+}
-const SpeakerStatsItem = (props: Props) => {
+const SpeakerStatsItem = (props: IProps) => {
const rowDisplayClass = `row item ${props.hasLeft ? 'has-left' : ''}`;
const nameTimeClass = `name-time${
props.showFaceExpressions ? ' expressions-on' : ''
diff --git a/react/features/speaker-stats/components/web/TimeElapsed.tsx b/react/features/speaker-stats/components/web/TimeElapsed.tsx
index 94b3646906..b831595831 100644
--- a/react/features/speaker-stats/components/web/TimeElapsed.tsx
+++ b/react/features/speaker-stats/components/web/TimeElapsed.tsx
@@ -6,13 +6,13 @@ import { createLocalizedTime } from '../timeFunctions';
/**
* The type of the React {@code Component} props of {@link TimeElapsed}.
*/
-type Props = {
+interface IProps {
/**
* The milliseconds to be converted into a human-readable format.
*/
time: number;
-};
+}
/**
* React component for displaying total time elapsed. Converts a total count of
@@ -22,7 +22,7 @@ type Props = {
* @augments Component
*/
-const TimeElapsed = ({ time }: Props) => {
+const TimeElapsed = ({ time }: IProps) => {
const { t } = useTranslation();
const timeElapsed = createLocalizedTime(time, t);
diff --git a/react/features/speaker-stats/components/web/Timeline.tsx b/react/features/speaker-stats/components/web/Timeline.tsx
index 5dd67a2566..6c6284ec68 100644
--- a/react/features/speaker-stats/components/web/Timeline.tsx
+++ b/react/features/speaker-stats/components/web/Timeline.tsx
@@ -8,11 +8,11 @@ import { addToOffset, setTimelinePanning } from '../../actions.any';
import { SCROLL_RATE, TIMELINE_COLORS } from '../../constants';
import { getFaceLandmarksEnd, getFaceLandmarksStart, getTimelineBoundaries } from '../../functions';
-type Props = {
+interface IProps {
faceLandmarks?: FaceLandmarks[];
-};
+}
-const Timeline = ({ faceLandmarks }: Props) => {
+const Timeline = ({ faceLandmarks }: IProps) => {
const startTimestamp = useSelector((state: IReduxState) => getConferenceTimestamp(state)) ?? 0;
const { left, right } = useSelector((state: IReduxState) => getTimelineBoundaries(state));
const { timelinePanning } = useSelector((state: IReduxState) => state['features/speaker-stats']);
diff --git a/react/features/toolbox/components/web/DialogPortal.ts b/react/features/toolbox/components/web/DialogPortal.ts
index f866829cd4..8f61753738 100644
--- a/react/features/toolbox/components/web/DialogPortal.ts
+++ b/react/features/toolbox/components/web/DialogPortal.ts
@@ -5,7 +5,7 @@ import { useSelector } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { ZINDEX_DIALOG_PORTAL } from '../../constants';
-type Props = {
+interface IProps {
/**
* The component(s) to be displayed within the drawer portal.
@@ -37,7 +37,7 @@ type Props = {
* This is used to determine the correct size of the portal content.
*/
targetSelector?: string;
-};
+}
/**
* Component meant to render a drawer at the bottom of the screen,
@@ -45,7 +45,7 @@ type Props = {
*
* @returns {ReactElement}
*/
-function DialogPortal({ children, className, style, getRef, setSize, targetSelector }: Props) {
+function DialogPortal({ children, className, style, getRef, setSize, targetSelector }: IProps) {
const clientWidth = useSelector((state: IReduxState) => state['features/base/responsive-ui'].clientWidth);
const [ portalTarget ] = useState(() => {
const portalDiv = document.createElement('div');
diff --git a/react/features/toolbox/components/web/EndConferenceButton.tsx b/react/features/toolbox/components/web/EndConferenceButton.tsx
index 3480743625..48275ceb5a 100644
--- a/react/features/toolbox/components/web/EndConferenceButton.tsx
+++ b/react/features/toolbox/components/web/EndConferenceButton.tsx
@@ -12,7 +12,7 @@ import { HangupContextMenuItem } from './HangupContextMenuItem';
/**
* The type of the React {@code Component} props of {@link EndConferenceButton}.
*/
-type Props = {
+interface IProps {
/**
* Key to use for toolbarButtonClicked event.
@@ -24,7 +24,7 @@ type Props = {
* whether to only notify or to also prevent button click routine.
*/
notifyMode?: string;
-};
+}
/**
@@ -33,7 +33,7 @@ type Props = {
* @param {Object} props - Component's props.
* @returns {JSX.Element} - The end conference button.
*/
-export const EndConferenceButton = (props: Props) => {
+export const EndConferenceButton = (props: IProps) => {
const { t } = useTranslation();
const dispatch = useDispatch();
const _isLocalParticipantModerator = useSelector(isLocalParticipantModerator);
diff --git a/react/features/toolbox/components/web/HangupContextMenuItem.tsx b/react/features/toolbox/components/web/HangupContextMenuItem.tsx
index 58318da322..859d78fa87 100644
--- a/react/features/toolbox/components/web/HangupContextMenuItem.tsx
+++ b/react/features/toolbox/components/web/HangupContextMenuItem.tsx
@@ -7,7 +7,7 @@ import { NOTIFY_CLICK_MODE } from '../../constants';
/**
* The type of the React {@code Component} props of {@link HangupContextMenuItem}.
*/
-type Props = {
+interface IProps {
/**
* Accessibility label for the button.
@@ -39,9 +39,7 @@ type Props = {
* Callback that performs the actual hangup action.
*/
onClick: Function;
-};
-
-declare let APP: any;
+}
/**
* Implementation of a button to be rendered within Hangup context menu.
@@ -49,7 +47,7 @@ declare let APP: any;
* @param {Object} props - Component's props.
* @returns {JSX.Element} - Button that would trigger the hangup action.
*/
-export const HangupContextMenuItem = (props: Props) => {
+export const HangupContextMenuItem = (props: IProps) => {
const shouldNotify = props.notifyMode !== undefined;
const shouldPreventExecution = props.notifyMode === NOTIFY_CLICK_MODE.PREVENT_AND_NOTIFY;
diff --git a/react/features/toolbox/components/web/JitsiPortal.tsx b/react/features/toolbox/components/web/JitsiPortal.tsx
index 0892d21199..4e8a8d057e 100644
--- a/react/features/toolbox/components/web/JitsiPortal.tsx
+++ b/react/features/toolbox/components/web/JitsiPortal.tsx
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
import DialogPortal from './DialogPortal';
-type Props = {
+interface IProps {
/**
* The component(s) to be displayed within the drawer portal.
@@ -13,7 +13,7 @@ type Props = {
* Class name used to add custom styles to the portal.
*/
className?: string;
-};
+}
/**
* Component meant to render a drawer at the bottom of the screen,
@@ -21,7 +21,7 @@ type Props = {
*
* @returns {ReactElement}
*/
-function JitsiPortal({ children, className }: Props) {
+function JitsiPortal({ children, className }: IProps) {
return (
<DialogPortal className = { `drawer-portal ${className ?? ''}` }>
{ children }
diff --git a/react/features/toolbox/components/web/LeaveConferenceButton.tsx b/react/features/toolbox/components/web/LeaveConferenceButton.tsx
index 8d2e525168..d5bdee52bc 100644
--- a/react/features/toolbox/components/web/LeaveConferenceButton.tsx
+++ b/react/features/toolbox/components/web/LeaveConferenceButton.tsx
@@ -12,7 +12,7 @@ import { HangupContextMenuItem } from './HangupContextMenuItem';
/**
* The type of the React {@code Component} props of {@link LeaveConferenceButton}.
*/
-type Props = {
+interface IProps {
/**
* Key to use for toolbarButtonClicked event.
@@ -24,7 +24,7 @@ type Props = {
* whether to only notify or to also prevent button click routine.
*/
notifyMode?: string;
-};
+}
/**
@@ -33,7 +33,7 @@ type Props = {
* @param {Object} props - Component's props.
* @returns {JSX.Element} - The leave conference button.
*/
-export const LeaveConferenceButton = (props: Props) => {
+export const LeaveConferenceButton = (props: IProps) => {
const { t } = useTranslation();
const dispatch = useDispatch();
diff --git a/react/features/transcribing/components/AbstractTranscribingLabel.tsx b/react/features/transcribing/components/AbstractTranscribingLabel.tsx
index 9d0f7aca6c..d7c1a0e82f 100644
--- a/react/features/transcribing/components/AbstractTranscribingLabel.tsx
+++ b/react/features/transcribing/components/AbstractTranscribingLabel.tsx
@@ -3,7 +3,7 @@ import { IReduxState } from '../../app/types';
/**
* The type of the React {@code Component} props of {@link TranscribingLabel}.
*/
-export type Props = {
+export interface IProps {
/**
* True if the label needs to be rendered, false otherwise.
@@ -14,7 +14,7 @@ export type Props = {
* Invoked to obtain translated strings.
*/
t: Function;
-};
+}
/**
* Maps (parts of) the redux state to the associated props of the
diff --git a/react/features/transcribing/components/TranscribingLabel.web.tsx b/react/features/transcribing/components/TranscribingLabel.web.tsx
index deeeba3cd0..59c551f965 100644
--- a/react/features/transcribing/components/TranscribingLabel.web.tsx
+++ b/react/features/transcribing/components/TranscribingLabel.web.tsx
@@ -5,9 +5,9 @@ import { translate } from '../../base/i18n/functions';
import Label from '../../base/label/components/web/Label';
import Tooltip from '../../base/tooltip/components/Tooltip';
-import { Props, _mapStateToProps } from './AbstractTranscribingLabel';
+import { IProps, _mapStateToProps } from './AbstractTranscribingLabel';
-const TranscribingLabel = ({ _showLabel, t }: Props) => {
+const TranscribingLabel = ({ _showLabel, t }: IProps) => {
if (!_showLabel) {
return null;
}
diff --git a/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts b/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts
index bd23df4875..0d6136e6a1 100644
--- a/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts
+++ b/react/features/video-menu/components/AbstractMuteEveryoneDialog.ts
@@ -1,5 +1,3 @@
-import { WithTranslation } from 'react-i18next';
-
import { IReduxState } from '../../app/types';
import { requestDisableAudioModeration, requestEnableAudioModeration } from '../../av-moderation/actions';
import { isEnabledFromState, isSupported } from '../../av-moderation/functions';
@@ -8,21 +6,21 @@ import { getLocalParticipant, getParticipantDisplayName } from '../../base/parti
import { muteAllParticipants } from '../actions';
import AbstractMuteRemoteParticipantDialog, {
- type Props as AbstractProps
+ type IProps as AbstractProps
} from './AbstractMuteRemoteParticipantDialog';
/**
* The type of the React {@code Component} props of
* {@link AbstractMuteEveryoneDialog}.
*/
-export type Props = AbstractProps & WithTranslation & {
+export interface IProps extends AbstractProps {
content?: string;
exclude: Array<string>;
isAudioModerationEnabled?: boolean;
isModerationSupported?: boolean;
showAdvancedModerationToggle: boolean;
title: string;
-};
+}
interface IState {
audioModerationEnabled?: boolean;
@@ -36,7 +34,7 @@ interface IState {
*
* @augments AbstractMuteRemoteParticipantDialog
*/
-export default class AbstractMuteEveryoneDialog<P extends Props> extends
+export default class AbstractMuteEveryoneDialog<P extends IProps> extends
AbstractMuteRemoteParticipantDialog<P, IState> {
static defaultProps = {
exclude: [],
@@ -107,9 +105,9 @@ export default class AbstractMuteEveryoneDialog<P extends Props> extends
*
* @param {IReduxState} state - The redux state.
* @param {Object} ownProps - The properties explicitly passed to the component.
- * @returns {Props}
+ * @returns {IProps}
*/
-export function abstractMapStateToProps(state: IReduxState, ownProps: Props) {
+export function abstractMapStateToProps(state: IReduxState, ownProps: IProps) {
const { exclude = [], t } = ownProps;
const whom = exclude
diff --git a/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts b/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts
index ac7ca6611a..9b443c22e2 100644
--- a/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts
+++ b/react/features/video-menu/components/AbstractMuteEveryonesVideoDialog.ts
@@ -1,5 +1,3 @@
-import { WithTranslation } from 'react-i18next';
-
import { IReduxState } from '../../app/types';
import { requestDisableVideoModeration, requestEnableVideoModeration } from '../../av-moderation/actions';
import { isEnabledFromState, isSupported } from '../../av-moderation/functions';
@@ -15,14 +13,14 @@ import AbstractMuteRemoteParticipantsVideoDialog, {
* The type of the React {@code Component} props of
* {@link AbstractMuteEveryonesVideoDialog}.
*/
-export type Props = AbstractProps & WithTranslation & {
+export interface IProps extends AbstractProps {
content?: string;
exclude: Array<string>;
isModerationSupported?: boolean;
isVideoModerationEnabled?: boolean;
showAdvancedModerationToggle: boolean;
title: string;
-};
+}
interface IState {
content: string;
@@ -36,7 +34,7 @@ interface IState {
*
* @augments AbstractMuteRemoteParticipantsVideoDialog
*/
-export default class AbstractMuteEveryonesVideoDialog<P extends Props>
+export default class AbstractMuteEveryonesVideoDialog<P extends IProps>
extends AbstractMuteRemoteParticipantsVideoDialog<P, IState> {
static defaultProps = {
exclude: [],
@@ -107,9 +105,9 @@ export default class AbstractMuteEveryonesVideoDialog<P extends Props>
*
* @param {IReduxState} state - The redux state.
* @param {Object} ownProps - The properties explicitly passed to the component.
- * @returns {Props}
+ * @returns {IProps}
*/
-export function abstractMapStateToProps(state: IReduxState, ownProps: Props) {
+export function abstractMapStateToProps(state: IReduxState, ownProps: IProps) {
const { exclude = [], t } = ownProps;
const isVideoModerationEnabled = isEnabledFromState(MEDIA_TYPE.VIDEO, state);
diff --git a/react/features/video-menu/components/AbstractMuteRemoteParticipantDialog.ts b/react/features/video-menu/components/AbstractMuteRemoteParticipantDialog.ts
index 8fa4da9175..e42fea9400 100644
--- a/react/features/video-menu/components/AbstractMuteRemoteParticipantDialog.ts
+++ b/react/features/video-menu/components/AbstractMuteRemoteParticipantDialog.ts
@@ -1,4 +1,5 @@
import { Component } from 'react';
+import { WithTranslation } from 'react-i18next';
import { MEDIA_TYPE } from '../../base/media/constants';
import { muteRemote } from '../actions';
@@ -7,7 +8,7 @@ import { muteRemote } from '../actions';
* The type of the React {@code Component} props of
* {@link AbstractMuteRemoteParticipantDialog}.
*/
-export type Props = {
+export interface IProps extends WithTranslation {
/**
* The Redux dispatch function.
@@ -18,19 +19,14 @@ export type Props = {
* The ID of the remote participant to be muted.
*/
participantID: string;
-
- /**
- * Function to translate i18n labels.
- */
- t: Function;
-};
+}
/**
* Abstract dialog to confirm a remote participant mute action.
*
* @augments Component
*/
-export default class AbstractMuteRemoteParticipantDialog<P extends Props = Props, State=void>
+export default class AbstractMuteRemoteParticipantDialog<P extends IProps = IProps, State=void>
extends Component<P, State> {
/**
* Initializes a new {@code AbstractMuteRemoteParticipantDialog} instance.
diff --git a/react/features/video-menu/components/native/MuteEveryoneDialog.js b/react/features/video-menu/components/native/MuteEveryoneDialog.js
index 1bc2956fe7..1b4c9c80bc 100644
--- a/react/features/video-menu/components/native/MuteEveryoneDialog.js
+++ b/react/features/video-menu/components/native/MuteEveryoneDialog.js
@@ -6,7 +6,7 @@ import { connect } from 'react-redux';
import ConfirmDialog from '../../../base/dialog/components/native/ConfirmDialog';
import { translate } from '../../../base/i18n';
import AbstractMuteEveryoneDialog, {
- type Props,
+ type IProps,
abstractMapStateToProps as _mapStateToProps } from '../AbstractMuteEveryoneDialog';
import styles from './styles';
@@ -17,7 +17,7 @@ import styles from './styles';
*
* @augments AbstractMuteEveryoneDialog
*/
-class MuteEveryoneDialog extends AbstractMuteEveryoneDialog<Props> {
+class MuteEveryoneDialog extends AbstractMuteEveryoneDialog<IProps> {
/**
* Renders the dialog switch.
diff --git a/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js b/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js
index efaefc7f48..1a95d8a6cc 100644
--- a/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js
+++ b/react/features/video-menu/components/native/MuteEveryonesVideoDialog.js
@@ -6,7 +6,7 @@ import { connect } from 'react-redux';
import ConfirmDialog from '../../../base/dialog/components/native/ConfirmDialog';
import { translate } from '../../../base/i18n';
import AbstractMuteEveryonesVideoDialog, {
- type Props,
+ type IProps,
abstractMapStateToProps as _mapStateToProps } from '../AbstractMuteEveryonesVideoDialog';
import styles from './styles';
@@ -17,7 +17,7 @@ import styles from './styles';
*
* @augments AbstractMuteEveryonesVideoDialog
*/
-class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<Props> {
+class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<IProps> {
/**
* Renders the dialog switch.
diff --git a/react/features/video-menu/components/web/MuteEveryoneDialog.tsx b/react/features/video-menu/components/web/MuteEveryoneDialog.tsx
index 1c0597cdb3..bc99cd6e32 100644
--- a/react/features/video-menu/components/web/MuteEveryoneDialog.tsx
+++ b/react/features/video-menu/components/web/MuteEveryoneDialog.tsx
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import Switch from '../../../base/ui/components/web/Switch';
-import AbstractMuteEveryoneDialog, { type Props, abstractMapStateToProps }
+import AbstractMuteEveryoneDialog, { type IProps, abstractMapStateToProps }
from '../AbstractMuteEveryoneDialog';
/**
@@ -13,7 +13,7 @@ import AbstractMuteEveryoneDialog, { type Props, abstractMapStateToProps }
*
* @augments AbstractMuteEveryoneDialog
*/
-class MuteEveryoneDialog extends AbstractMuteEveryoneDialog<Props> {
+class MuteEveryoneDialog extends AbstractMuteEveryoneDialog<IProps> {
/**
* Implements React's {@link Component#render()}.
diff --git a/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx b/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx
index 073f7a47d5..78793d8747 100644
--- a/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx
+++ b/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
import Dialog from '../../../base/ui/components/web/Dialog';
import Switch from '../../../base/ui/components/web/Switch';
-import AbstractMuteEveryonesVideoDialog, { type Props, abstractMapStateToProps }
+import AbstractMuteEveryonesVideoDialog, { type IProps, abstractMapStateToProps }
from '../AbstractMuteEveryonesVideoDialog';
/**
@@ -13,7 +13,7 @@ import AbstractMuteEveryonesVideoDialog, { type Props, abstractMapStateToProps }
*
* @augments AbstractMuteEveryonesVideoDialog
*/
-class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<Props> {
+class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<IProps> {
/**
* Implements React's {@link Component#render()}.
diff --git a/react/features/whiteboard/components/web/Whiteboard.tsx b/react/features/whiteboard/components/web/Whiteboard.tsx
index 999050785c..6498b86387 100644
--- a/react/features/whiteboard/components/web/Whiteboard.tsx
+++ b/react/features/whiteboard/components/web/Whiteboard.tsx
@@ -1,6 +1,7 @@
import { ExcalidrawApp } from '@jitsi/excalidraw';
import clsx from 'clsx';
import React, { useCallback, useEffect, useRef } from 'react';
+import { WithTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
// @ts-expect-error
@@ -33,24 +34,13 @@ interface IDimensions {
width: string;
}
-/**
- * The type of the React {@link Component} props of {@link Whiteboard}.
- */
-type Props = {
-
- /**
- * Invoked to obtain translated strings.
- */
- t: Function;
-};
-
/**
* The Whiteboard component.
*
* @param {Props} props - The React props passed to this component.
* @returns {JSX.Element} - The React component.
*/
-const Whiteboard = (props: Props): JSX.Element => {
+const Whiteboard = (props: WithTranslation): JSX.Element => {
const excalidrawRef = useRef<any>(null);
const collabAPIRef = useRef<any>(null);