Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
language(typescript) actionTypes.js -> actionTypes.ts (#10940)
Calinteodor7c523f325053
diff --git a/.eslintignore b/.eslintignoreindex eab8d9621d..32e5e1fefb 100644--- a/.eslintignore+++ b/.eslintignore@@ -16,4 +16,4 @@ react/features/face-landmarks/resources/*!.eslintrc.js# Not worth it.-actionTypes.js+actionTypes.tsdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex db85bd4bae..43c3c7514a 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -3,8 +3,8 @@ We would love to have your help. Before you start working however, please readand follow this short guide.# Reporting Issues-Provide as much information as possible. Mention the version of Jitsi Meet,-Jicofo and JVB you are using, and explain (as detailed as you can) how the+Provide as much information as possible. Mention the version of Jitsi Meet,+Jicofo and JVB you are using, and explain (as detailed as you can) how theproblem can be reproduced.# Code contributions@@ -130,7 +130,7 @@ When adding a new feature, this would be the usual layout.```react/features/sample/-├── actionTypes.js+├── actionTypes.ts├── actions.js├── components│ ├── AnotherComponent.jsdiff --git a/conference.js b/conference.jsindex 71e83b7a9b..b1c4626a86 100644--- a/conference.js+++ b/conference.js@@ -66,7 +66,6 @@ import {} from './react/features/base/devices';import {browser,- isFatalJitsiConnectionError,JitsiConferenceErrors,JitsiConferenceEvents,JitsiConnectionErrors,@@ -77,6 +76,7 @@ import {JitsiTrackErrors,JitsiTrackEvents} from './react/features/base/lib-jitsi-meet';+import { isFatalJitsiConnectionError } from './react/features/base/lib-jitsi-meet/functions';import {getStartWithAudioMuted,getStartWithVideoMuted,diff --git a/connection.js b/connection.jsindex faa9344ae8..07518b3ff4 100644--- a/connection.js+++ b/connection.js@@ -13,10 +13,10 @@ import {import { openDialog } from './react/features/base/dialog/actions';import { setJWT } from './react/features/base/jwt';import {- isFatalJitsiConnectionError,JitsiConnectionErrors,JitsiConnectionEvents} from './react/features/base/lib-jitsi-meet';+import { isFatalJitsiConnectionError } from './react/features/base/lib-jitsi-meet/functions';import { getCustomerDetails } from './react/features/jaas/actions.any';import { isVpaasMeeting, getJaasJWT } from './react/features/jaas/functions';import { setPrejoinDisplayNameRequired } from './react/features/prejoin/actions';diff --git a/package-lock.json b/package-lock.jsonindex 9f5067f2ec..c392ae5c01 100644--- a/package-lock.json+++ b/package-lock.json@@ -161,6 +161,7 @@"string-replace-loader": "3.0.3","style-loader": "0.19.0","traverse": "0.6.6",+ "ts-loader": "9.2.6","typescript": "4.3.5","unorm": "1.6.0","webpack": "5.57.1",@@ -18332,6 +18333,110 @@"resolved": "https://registry.npmjs.org/ts-easing/-/ts-easing-0.2.0.tgz","integrity": "sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ=="},+ "node_modules/ts-loader": {+ "version": "9.2.6",+ "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.6.tgz",+ "integrity": "sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==",+ "dev": true,+ "dependencies": {+ "chalk": "^4.1.0",+ "enhanced-resolve": "^5.0.0",+ "micromatch": "^4.0.0",+ "semver": "^7.3.4"+ },+ "engines": {+ "node": ">=12.0.0"+ },+ "peerDependencies": {+ "typescript": "*",+ "webpack": "^5.0.0"+ }+ },+ "node_modules/ts-loader/node_modules/ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "dependencies": {+ "color-convert": "^2.0.1"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/ts-loader/node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/ts-loader/node_modules/color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "dependencies": {+ "color-name": "~1.1.4"+ },+ "engines": {+ "node": ">=7.0.0"+ }+ },+ "node_modules/ts-loader/node_modules/color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true+ },+ "node_modules/ts-loader/node_modules/has-flag": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",+ "dev": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/ts-loader/node_modules/semver": {+ "version": "7.3.5",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",+ "dev": true,+ "dependencies": {+ "lru-cache": "^6.0.0"+ },+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/ts-loader/node_modules/supports-color": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",+ "dev": true,+ "dependencies": {+ "has-flag": "^4.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },"node_modules/tsconfig-paths": {"version": "3.12.0","resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz",@@ -33840,6 +33945,78 @@"resolved": "https://registry.npmjs.org/ts-easing/-/ts-easing-0.2.0.tgz","integrity": "sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ=="},+ "ts-loader": {+ "version": "9.2.6",+ "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.6.tgz",+ "integrity": "sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==",+ "dev": true,+ "requires": {+ "chalk": "^4.1.0",+ "enhanced-resolve": "^5.0.0",+ "micromatch": "^4.0.0",+ "semver": "^7.3.4"+ },+ "dependencies": {+ "ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "requires": {+ "color-convert": "^2.0.1"+ }+ },+ "chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "requires": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ }+ },+ "color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "requires": {+ "color-name": "~1.1.4"+ }+ },+ "color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true+ },+ "has-flag": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",+ "dev": true+ },+ "semver": {+ "version": "7.3.5",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",+ "dev": true,+ "requires": {+ "lru-cache": "^6.0.0"+ }+ },+ "supports-color": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",+ "dev": true,+ "requires": {+ "has-flag": "^4.0.0"+ }+ }+ }+ },"tsconfig-paths": {"version": "3.12.0","resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz",diff --git a/package.json b/package.jsonindex f1634340a8..3442eb2432 100644--- a/package.json+++ b/package.json@@ -166,6 +166,7 @@"string-replace-loader": "3.0.3","style-loader": "0.19.0","traverse": "0.6.6",+ "ts-loader": "9.2.6","typescript": "4.3.5","unorm": "1.6.0","webpack": "5.57.1",diff --git a/react/features/analytics/actionTypes.js b/react/features/analytics/actionTypes.tssimilarity index 100%rename from react/features/analytics/actionTypes.jsrename to react/features/analytics/actionTypes.tsdiff --git a/react/features/analytics/functions.js b/react/features/analytics/functions.jsindex e8b131b8e2..65ffd62b4b 100644--- a/react/features/analytics/functions.js+++ b/react/features/analytics/functions.js@@ -8,9 +8,9 @@ import {} from '../base/environment/utils';import JitsiMeetJS, {analytics,- browser,- isAnalyticsEnabled+ browser} from '../base/lib-jitsi-meet';+import { isAnalyticsEnabled } from '../base/lib-jitsi-meet/functions';import { getJitsiMeetGlobalNS, loadScript, parseURIString } from '../base/util';import { AmplitudeHandler, MatomoHandler } from './handlers';diff --git a/react/features/app/actions.web.js b/react/features/app/actions.web.jsindex e70d3953d2..73a9d917fb 100644--- a/react/features/app/actions.web.js+++ b/react/features/app/actions.web.js@@ -13,7 +13,7 @@ import {storeConfig} from '../base/config';import { setLocationURL } from '../base/connection';-import { loadConfig } from '../base/lib-jitsi-meet';+import { loadConfig } from '../base/lib-jitsi-meet/functions.web';import {getBackendSafeRoomName,parseURIStringdiff --git a/react/features/authentication/actionTypes.js b/react/features/authentication/actionTypes.tssimilarity index 100%rename from react/features/authentication/actionTypes.jsrename to react/features/authentication/actionTypes.tsdiff --git a/react/features/av-moderation/actionTypes.js b/react/features/av-moderation/actionTypes.tssimilarity index 100%rename from react/features/av-moderation/actionTypes.jsrename to react/features/av-moderation/actionTypes.tsdiff --git a/react/features/base/app/actionTypes.js b/react/features/base/app/actionTypes.tssimilarity index 100%rename from react/features/base/app/actionTypes.jsrename to react/features/base/app/actionTypes.tsdiff --git a/react/features/base/audio-only/actionTypes.js b/react/features/base/audio-only/actionTypes.tssimilarity index 100%rename from react/features/base/audio-only/actionTypes.jsrename to react/features/base/audio-only/actionTypes.tsdiff --git a/react/features/base/conference/actionTypes.js b/react/features/base/conference/actionTypes.tssimilarity index 100%rename from react/features/base/conference/actionTypes.jsrename to react/features/base/conference/actionTypes.tsdiff --git a/react/features/base/config/actionTypes.js b/react/features/base/config/actionTypes.tssimilarity index 100%rename from react/features/base/config/actionTypes.jsrename to react/features/base/config/actionTypes.tsdiff --git a/react/features/base/connection/actionTypes.js b/react/features/base/connection/actionTypes.tssimilarity index 100%rename from react/features/base/connection/actionTypes.jsrename to react/features/base/connection/actionTypes.tsdiff --git a/react/features/base/devices/actionTypes.js b/react/features/base/devices/actionTypes.tssimilarity index 100%rename from react/features/base/devices/actionTypes.jsrename to react/features/base/devices/actionTypes.tsdiff --git a/react/features/base/dialog/actionTypes.js b/react/features/base/dialog/actionTypes.tssimilarity index 100%rename from react/features/base/dialog/actionTypes.jsrename to react/features/base/dialog/actionTypes.tsdiff --git a/react/features/base/flags/actionTypes.js b/react/features/base/flags/actionTypes.tssimilarity index 100%rename from react/features/base/flags/actionTypes.jsrename to react/features/base/flags/actionTypes.tsdiff --git a/react/features/base/i18n/actionTypes.js b/react/features/base/i18n/actionTypes.tssimilarity index 100%rename from react/features/base/i18n/actionTypes.jsrename to react/features/base/i18n/actionTypes.tsdiff --git a/react/features/base/jwt/actionTypes.js b/react/features/base/jwt/actionTypes.tssimilarity index 100%rename from react/features/base/jwt/actionTypes.jsrename to react/features/base/jwt/actionTypes.tsdiff --git a/react/features/base/known-domains/actionTypes.js b/react/features/base/known-domains/actionTypes.tssimilarity index 100%rename from react/features/base/known-domains/actionTypes.jsrename to react/features/base/known-domains/actionTypes.tsdiff --git a/react/features/base/lastn/actionTypes.js b/react/features/base/lastn/actionTypes.tssimilarity index 100%rename from react/features/base/lastn/actionTypes.jsrename to react/features/base/lastn/actionTypes.tsdiff --git a/react/features/base/lib-jitsi-meet/actionTypes.js b/react/features/base/lib-jitsi-meet/actionTypes.tssimilarity index 100%rename from react/features/base/lib-jitsi-meet/actionTypes.jsrename to react/features/base/lib-jitsi-meet/actionTypes.tsdiff --git a/react/features/base/lib-jitsi-meet/index.js b/react/features/base/lib-jitsi-meet/index.jsindex b316e0fa8e..4ecaa0c6f8 100644--- a/react/features/base/lib-jitsi-meet/index.js+++ b/react/features/base/lib-jitsi-meet/index.js@@ -24,7 +24,3 @@ export const JitsiRecordingConstants = JitsiMeetJS.constants.recording;export const JitsiSIPVideoGWStatus = JitsiMeetJS.constants.sipVideoGW;export const JitsiTrackErrors = JitsiMeetJS.errors.track;export const JitsiTrackEvents = JitsiMeetJS.events.track;--export * from './actions';-export * from './actionTypes';-export * from './functions';diff --git a/react/features/base/logging/actionTypes.js b/react/features/base/logging/actionTypes.tssimilarity index 100%rename from react/features/base/logging/actionTypes.jsrename to react/features/base/logging/actionTypes.tsdiff --git a/react/features/base/logging/middleware.js b/react/features/base/logging/middleware.jsindex 545ae177c4..2a2b7213d9 100644--- a/react/features/base/logging/middleware.js+++ b/react/features/base/logging/middleware.js@@ -5,9 +5,9 @@ import Logger from '@jitsi/logger';import { APP_WILL_MOUNT } from '../app';import { CONFERENCE_JOINED, getCurrentConference } from '../conference';import JitsiMeetJS, {- LIB_WILL_INIT,JitsiConferenceEvents} from '../lib-jitsi-meet';+import { LIB_WILL_INIT } from '../lib-jitsi-meet/actionTypes';import { MiddlewareRegistry } from '../redux';import { isTestModeEnabled } from '../testing';diff --git a/react/features/base/media/actionTypes.js b/react/features/base/media/actionTypes.tssimilarity index 100%rename from react/features/base/media/actionTypes.jsrename to react/features/base/media/actionTypes.tsdiff --git a/react/features/base/net-info/actionTypes.js b/react/features/base/net-info/actionTypes.tssimilarity index 100%rename from react/features/base/net-info/actionTypes.jsrename to react/features/base/net-info/actionTypes.tsdiff --git a/react/features/base/participants/actionTypes.js b/react/features/base/participants/actionTypes.tssimilarity index 100%rename from react/features/base/participants/actionTypes.jsrename to react/features/base/participants/actionTypes.tsdiff --git a/react/features/base/responsive-ui/actionTypes.js b/react/features/base/responsive-ui/actionTypes.tssimilarity index 100%rename from react/features/base/responsive-ui/actionTypes.jsrename to react/features/base/responsive-ui/actionTypes.tsdiff --git a/react/features/base/settings/actionTypes.js b/react/features/base/settings/actionTypes.tssimilarity index 100%rename from react/features/base/settings/actionTypes.jsrename to react/features/base/settings/actionTypes.tsdiff --git a/react/features/base/sounds/actionTypes.js b/react/features/base/sounds/actionTypes.tssimilarity index 100%rename from react/features/base/sounds/actionTypes.jsrename to react/features/base/sounds/actionTypes.tsdiff --git a/react/features/base/testing/actionTypes.js b/react/features/base/testing/actionTypes.tssimilarity index 100%rename from react/features/base/testing/actionTypes.jsrename to react/features/base/testing/actionTypes.tsdiff --git a/react/features/base/tracks/actionTypes.js b/react/features/base/tracks/actionTypes.tssimilarity index 100%rename from react/features/base/tracks/actionTypes.jsrename to react/features/base/tracks/actionTypes.tsdiff --git a/react/features/base/tracks/actions.js b/react/features/base/tracks/actions.jsindex 8d30390889..0288e2621c 100644--- a/react/features/base/tracks/actions.js+++ b/react/features/base/tracks/actions.js@@ -7,7 +7,8 @@ import {import { NOTIFICATION_TIMEOUT_TYPE, showErrorNotification, showNotification } from '../../notifications';import { getCurrentConference } from '../conference';import { getMultipleVideoSupportFeatureFlag, getSourceNameSignalingFeatureFlag } from '../config';-import { JitsiTrackErrors, JitsiTrackEvents, createLocalTrack } from '../lib-jitsi-meet';+import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';+import { createLocalTrack } from '../lib-jitsi-meet/functions';import {CAMERA_FACING_MODE,MEDIA_TYPE,diff --git a/react/features/base/user-interaction/actionTypes.js b/react/features/base/user-interaction/actionTypes.tssimilarity index 100%rename from react/features/base/user-interaction/actionTypes.jsrename to react/features/base/user-interaction/actionTypes.tsdiff --git a/react/features/breakout-rooms/actionTypes.js b/react/features/breakout-rooms/actionTypes.tssimilarity index 100%rename from react/features/breakout-rooms/actionTypes.jsrename to react/features/breakout-rooms/actionTypes.tsdiff --git a/react/features/calendar-sync/actionTypes.js b/react/features/calendar-sync/actionTypes.tssimilarity index 100%rename from react/features/calendar-sync/actionTypes.jsrename to react/features/calendar-sync/actionTypes.tsdiff --git a/react/features/chat/actionTypes.js b/react/features/chat/actionTypes.tssimilarity index 100%rename from react/features/chat/actionTypes.jsrename to react/features/chat/actionTypes.tsdiff --git a/react/features/deep-linking/actionTypes.js b/react/features/deep-linking/actionTypes.tssimilarity index 100%rename from react/features/deep-linking/actionTypes.jsrename to react/features/deep-linking/actionTypes.tsdiff --git a/react/features/display-name/components/native/DisplayNameLabel.js b/react/features/display-name/components/native/DisplayNameLabel.tsxsimilarity index 64%rename from react/features/display-name/components/native/DisplayNameLabel.jsrename to react/features/display-name/components/native/DisplayNameLabel.tsxindex 797985cfa7..78a754446f 100644--- a/react/features/display-name/components/native/DisplayNameLabel.js+++ b/react/features/display-name/components/native/DisplayNameLabel.tsx@@ -1,13 +1,11 @@-// @flow--import React, { Component } from 'react';+import * as React from 'react';import { Text, View } from 'react-native';import {getParticipantById,getParticipantDisplayName-} from '../../../base/participants';-import { connect } from '../../../base/redux';+} from '../../../base/participants/functions';+import { connect } from '../../../base/redux/functions';import styles from './styles';@@ -16,28 +14,28 @@ type Props = {/*** The name of the participant to render.*/- _participantName: string,+ _participantName: string;/*** True of the label needs to be rendered. False otherwise.*/- _render: boolean,+ _render: boolean;/*** Whether ot not the name is in a container.*/- contained?: boolean,+ contained?: boolean;/*** The ID of the participant to render the label for.*/- participantId: string+ participantId: string;}/*** Renders a label with the display name of the on-stage participant.*/-class DisplayNameLabel extends Component<Props> {+class DisplayNameLabel extends React.Component<Props> {/*** Implements {@code Component#render}.*@@ -63,18 +61,16 @@ class DisplayNameLabel extends Component<Props> {/*** Maps part of the Redux state to the props of this component.*- * @param {Object} state - The Redux state.+ * @param {any} state - The Redux state.* @param {Props} ownProps - The own props of the component.- * @returns {{- * }}+ * @returns {Props}*/-function _mapStateToProps(state: Object, ownProps: Props) {- const { participantId, contained } = ownProps;- const participant = getParticipantById(state, participantId);+function _mapStateToProps(state: any, ownProps) {+ const participant = getParticipantById(state, ownProps.participantId);return {- _participantName: getParticipantDisplayName(state, participantId),- _render: participant && (!participant?.local || contained) && !participant?.isFakeParticipant+ _participantName: getParticipantDisplayName(state, ownProps.participantId),+ _render: participant && (!participant?.local || ownProps.contained) && !participant?.isFakeParticipant};}diff --git a/react/features/display-name/components/native/index.js b/react/features/display-name/components/native/index.jsindex fc844badf9..f31472b2f1 100644--- a/react/features/display-name/components/native/index.js+++ b/react/features/display-name/components/native/index.js@@ -1,4 +1,2 @@-// @flow-export { default as DisplayNameLabel } from './DisplayNameLabel';export { default as DisplayNamePrompt } from './DisplayNamePrompt';diff --git a/react/features/display-name/components/web/DisplayNameBadge.js b/react/features/display-name/components/web/DisplayNameBadge.tsxsimilarity index 71%rename from react/features/display-name/components/web/DisplayNameBadge.jsrename to react/features/display-name/components/web/DisplayNameBadge.tsxindex aafeeee8bc..f668756bf1 100644--- a/react/features/display-name/components/web/DisplayNameBadge.js+++ b/react/features/display-name/components/web/DisplayNameBadge.tsx@@ -1,22 +1,19 @@-// @flow-import { makeStyles } from '@material-ui/core/styles';import React from 'react';-type Props = {-- /**- * The name to be displayed within the badge.- */- name: string+interface Theme {+ palette: any;+ text01: string;}-const useStyles = makeStyles(theme => {+const useStyles = makeStyles((theme: Theme) => {+ const { text01 } = theme.palette;+return {badge: {background: 'rgba(0, 0, 0, 0.6)',borderRadius: '3px',- color: theme.palette.text01,+ color: text01,maxWidth: '50%',overflow: 'hidden',padding: '2px 16px',@@ -32,12 +29,12 @@ const useStyles = makeStyles(theme => {* @param {Props} props - The props of the component.* @returns {ReactElement}*/-const DisplayNameBadge = ({ name }: Props) => {+const DisplayNameBadge: React.FC<{ name: string }> = ({ name }) => {const classes = useStyles();return (<div className = { classes.badge }>- {name}+ { name }</div>);};diff --git a/react/features/display-name/functions.js b/react/features/display-name/functions.tssimilarity index 80%rename from react/features/display-name/functions.jsrename to react/features/display-name/functions.tsindex 728033e206..56f6392f48 100644--- a/react/features/display-name/functions.js+++ b/react/features/display-name/functions.ts@@ -1,4 +1,3 @@-// @flow/*** Appends a suffix to the display name.@@ -7,7 +6,7 @@* @param {string} suffix - Suffix that will be appended.* @returns {string} The formatted display name.*/-export function appendSuffix(displayName: string, suffix: string = '') {+export function appendSuffix(displayName: string, suffix = ''): string {return `${displayName || suffix}${displayName && suffix && displayName !== suffix ? ` (${suffix})` : ''}`;}diff --git a/react/features/dropbox/actionTypes.js b/react/features/dropbox/actionTypes.tssimilarity index 100%rename from react/features/dropbox/actionTypes.jsrename to react/features/dropbox/actionTypes.tsdiff --git a/react/features/dynamic-branding/actionTypes.js b/react/features/dynamic-branding/actionTypes.tssimilarity index 100%rename from react/features/dynamic-branding/actionTypes.jsrename to react/features/dynamic-branding/actionTypes.tsdiff --git a/react/features/dynamic-branding/functions.any.js b/react/features/dynamic-branding/functions.any.jsindex 93443bbee1..9f23aa9623 100644--- a/react/features/dynamic-branding/functions.any.js+++ b/react/features/dynamic-branding/functions.any.js@@ -1,6 +1,6 @@// @flow-import { loadConfig } from '../base/lib-jitsi-meet';+import { loadConfig } from '../base/lib-jitsi-meet/functions';/*** Extracts the fqn part from a path, where fqn representsdiff --git a/react/features/e2ee/actionTypes.js b/react/features/e2ee/actionTypes.tssimilarity index 100%rename from react/features/e2ee/actionTypes.jsrename to react/features/e2ee/actionTypes.tsdiff --git a/react/features/etherpad/actionTypes.js b/react/features/etherpad/actionTypes.tssimilarity index 100%rename from react/features/etherpad/actionTypes.jsrename to react/features/etherpad/actionTypes.tsdiff --git a/react/features/face-landmarks/actionTypes.js b/react/features/face-landmarks/actionTypes.tssimilarity index 98%rename from react/features/face-landmarks/actionTypes.jsrename to react/features/face-landmarks/actionTypes.tsindex d8ad6c952a..71fd0f60e5 100644--- a/react/features/face-landmarks/actionTypes.js+++ b/react/features/face-landmarks/actionTypes.ts@@ -1,5 +1,3 @@-// @flow-/*** Redux action type dispatched in order to add a face expression.*@@ -19,7 +17,7 @@ export const ADD_FACE_EXPRESSION = 'ADD_FACE_EXPRESSION';* faceExpression: string* }*/-export const ADD_TO_FACE_EXPRESSIONS_BUFFER = 'ADD_TO_FACE_EXPRESSIONS_BUFFER ';+export const ADD_TO_FACE_EXPRESSIONS_BUFFER = 'ADD_TO_FACE_EXPRESSIONS_BUFFER';/*** Redux action type dispatched in order to clear the face expressions buffer in the state.diff --git a/react/features/face-landmarks/middleware.js b/react/features/face-landmarks/middleware.jsindex a4f21a1393..451afcd40f 100644--- a/react/features/face-landmarks/middleware.js+++ b/react/features/face-landmarks/middleware.js@@ -1,5 +1,3 @@-// @flow-import {CONFERENCE_JOINED,CONFERENCE_WILL_LEAVE,diff --git a/react/features/feedback/actionTypes.js b/react/features/feedback/actionTypes.tssimilarity index 100%rename from react/features/feedback/actionTypes.jsrename to react/features/feedback/actionTypes.tsdiff --git a/react/features/filmstrip/actionTypes.js b/react/features/filmstrip/actionTypes.tssimilarity index 100%rename from react/features/filmstrip/actionTypes.jsrename to react/features/filmstrip/actionTypes.tsdiff --git a/react/features/follow-me/actionTypes.js b/react/features/follow-me/actionTypes.tssimilarity index 100%rename from react/features/follow-me/actionTypes.jsrename to react/features/follow-me/actionTypes.tsdiff --git a/react/features/gifs/actionTypes.js b/react/features/gifs/actionTypes.tssimilarity index 100%rename from react/features/gifs/actionTypes.jsrename to react/features/gifs/actionTypes.tsdiff --git a/react/features/google-api/actionTypes.js b/react/features/google-api/actionTypes.tssimilarity index 100%rename from react/features/google-api/actionTypes.jsrename to react/features/google-api/actionTypes.tsdiff --git a/react/features/invite/actionTypes.js b/react/features/invite/actionTypes.tssimilarity index 100%rename from react/features/invite/actionTypes.jsrename to react/features/invite/actionTypes.tsdiff --git a/react/features/jaas/actionTypes.js b/react/features/jaas/actionTypes.tssimilarity index 100%rename from react/features/jaas/actionTypes.jsrename to react/features/jaas/actionTypes.tsdiff --git a/react/features/keyboard-shortcuts/actionTypes.js b/react/features/keyboard-shortcuts/actionTypes.tssimilarity index 100%rename from react/features/keyboard-shortcuts/actionTypes.jsrename to react/features/keyboard-shortcuts/actionTypes.tsdiff --git a/react/features/large-video/actionTypes.js b/react/features/large-video/actionTypes.tssimilarity index 100%rename from react/features/large-video/actionTypes.jsrename to react/features/large-video/actionTypes.tsdiff --git a/react/features/lobby/actionTypes.js b/react/features/lobby/actionTypes.tssimilarity index 100%rename from react/features/lobby/actionTypes.jsrename to react/features/lobby/actionTypes.tsdiff --git a/react/features/local-recording/actionTypes.js b/react/features/local-recording/actionTypes.tssimilarity index 100%rename from react/features/local-recording/actionTypes.jsrename to react/features/local-recording/actionTypes.tsdiff --git a/react/features/mobile/audio-mode/actionTypes.js b/react/features/mobile/audio-mode/actionTypes.tssimilarity index 100%rename from react/features/mobile/audio-mode/actionTypes.jsrename to react/features/mobile/audio-mode/actionTypes.tsdiff --git a/react/features/mobile/background/actionTypes.js b/react/features/mobile/background/actionTypes.tssimilarity index 100%rename from react/features/mobile/background/actionTypes.jsrename to react/features/mobile/background/actionTypes.tsdiff --git a/react/features/mobile/call-integration/actionTypes.js b/react/features/mobile/call-integration/actionTypes.tssimilarity index 100%rename from react/features/mobile/call-integration/actionTypes.jsrename to react/features/mobile/call-integration/actionTypes.tsdiff --git a/react/features/mobile/external-api/actionTypes.js b/react/features/mobile/external-api/actionTypes.tssimilarity index 100%rename from react/features/mobile/external-api/actionTypes.jsrename to react/features/mobile/external-api/actionTypes.tsdiff --git a/react/features/mobile/full-screen/actionTypes.js b/react/features/mobile/full-screen/actionTypes.tssimilarity index 100%rename from react/features/mobile/full-screen/actionTypes.jsrename to react/features/mobile/full-screen/actionTypes.tsdiff --git a/react/features/mobile/picture-in-picture/actionTypes.js b/react/features/mobile/picture-in-picture/actionTypes.tssimilarity index 100%rename from react/features/mobile/picture-in-picture/actionTypes.jsrename to react/features/mobile/picture-in-picture/actionTypes.tsdiff --git a/react/features/mobile/watchos/actionTypes.js b/react/features/mobile/watchos/actionTypes.tssimilarity index 100%rename from react/features/mobile/watchos/actionTypes.jsrename to react/features/mobile/watchos/actionTypes.tsdiff --git a/react/features/no-audio-signal/actionTypes.js b/react/features/no-audio-signal/actionTypes.tssimilarity index 100%rename from react/features/no-audio-signal/actionTypes.jsrename to react/features/no-audio-signal/actionTypes.tsdiff --git a/react/features/noise-detection/actionTypes.js b/react/features/noise-detection/actionTypes.tssimilarity index 100%rename from react/features/noise-detection/actionTypes.jsrename to react/features/noise-detection/actionTypes.tsdiff --git a/react/features/notifications/actionTypes.js b/react/features/notifications/actionTypes.tssimilarity index 100%rename from react/features/notifications/actionTypes.jsrename to react/features/notifications/actionTypes.tsdiff --git a/react/features/overlay/actionTypes.js b/react/features/overlay/actionTypes.tssimilarity index 100%rename from react/features/overlay/actionTypes.jsrename to react/features/overlay/actionTypes.tsdiff --git a/react/features/overlay/components/AbstractPageReloadOverlay.js b/react/features/overlay/components/AbstractPageReloadOverlay.jsindex fa32f68aca..55084fb865 100644--- a/react/features/overlay/components/AbstractPageReloadOverlay.js+++ b/react/features/overlay/components/AbstractPageReloadOverlay.js@@ -12,7 +12,7 @@ import { reloadNow } from '../../app/actions';import {isFatalJitsiConferenceError,isFatalJitsiConnectionError-} from '../../base/lib-jitsi-meet';+} from '../../base/lib-jitsi-meet/functions';import logger from '../logger';import ReloadButton from './web/ReloadButton';diff --git a/react/features/overlay/middleware.js b/react/features/overlay/middleware.jsindex 0742899941..7271c42912 100644--- a/react/features/overlay/middleware.js+++ b/react/features/overlay/middleware.js@@ -1,10 +1,10 @@// @flow+import { JitsiConferenceErrors } from '../base/lib-jitsi-meet';import {- JitsiConferenceErrors,isFatalJitsiConferenceError,isFatalJitsiConnectionError-} from '../base/lib-jitsi-meet';+} from '../base/lib-jitsi-meet/functions';import { StateListenerRegistry } from '../base/redux';import { setFatalError } from './actions';diff --git a/react/features/participants-pane/actionTypes.js b/react/features/participants-pane/actionTypes.tssimilarity index 100%rename from react/features/participants-pane/actionTypes.jsrename to react/features/participants-pane/actionTypes.tsdiff --git a/react/features/polls/actionTypes.js b/react/features/polls/actionTypes.tssimilarity index 100%rename from react/features/polls/actionTypes.jsrename to react/features/polls/actionTypes.tsdiff --git a/react/features/power-monitor/actionTypes.js b/react/features/power-monitor/actionTypes.tssimilarity index 100%rename from react/features/power-monitor/actionTypes.jsrename to react/features/power-monitor/actionTypes.tsdiff --git a/react/features/prejoin/actionTypes.js b/react/features/prejoin/actionTypes.tssimilarity index 100%rename from react/features/prejoin/actionTypes.jsrename to react/features/prejoin/actionTypes.tsdiff --git a/react/features/prejoin/actions.js b/react/features/prejoin/actions.jsindex 87fd6cb367..3f09c7d5d3 100644--- a/react/features/prejoin/actions.js+++ b/react/features/prejoin/actions.js@@ -6,7 +6,8 @@ declare var APP: Object;import { v4 as uuidv4 } from 'uuid';import { getDialOutStatusUrl, getDialOutUrl, updateConfig } from '../base/config';-import { browser, createLocalTrack } from '../base/lib-jitsi-meet';+import { browser } from '../base/lib-jitsi-meet';+import { createLocalTrack } from '../base/lib-jitsi-meet/functions';import { isVideoMutedByUser, MEDIA_TYPE } from '../base/media';import {createLocalTracksF,diff --git a/react/features/reactions/actionTypes.js b/react/features/reactions/actionTypes.tssimilarity index 100%rename from react/features/reactions/actionTypes.jsrename to react/features/reactions/actionTypes.tsdiff --git a/react/features/recent-list/actionTypes.js b/react/features/recent-list/actionTypes.tssimilarity index 100%rename from react/features/recent-list/actionTypes.jsrename to react/features/recent-list/actionTypes.tsdiff --git a/react/features/recording/actionTypes.js b/react/features/recording/actionTypes.tssimilarity index 100%rename from react/features/recording/actionTypes.jsrename to react/features/recording/actionTypes.tsdiff --git a/react/features/recording/actions.any.js b/react/features/recording/actions.any.jsindex cdced9c483..9945dabb57 100644--- a/react/features/recording/actions.any.js+++ b/react/features/recording/actions.any.js@@ -21,7 +21,12 @@ import {SET_SELECTED_RECORDING_SERVICE,SET_STREAM_KEY} from './actionTypes';-import { getRecordingLink, getResourceId, isSavingRecordingOnDropbox, sendMeetingHighlight } from './functions';+import {+ getRecordingLink,+ getResourceId,+ isSavingRecordingOnDropbox,+ sendMeetingHighlight+} from './functions';import logger from './logger';declare var APP: Object;diff --git a/react/features/remote-control/actionTypes.js b/react/features/remote-control/actionTypes.tssimilarity index 100%rename from react/features/remote-control/actionTypes.jsrename to react/features/remote-control/actionTypes.tsdiff --git a/react/features/rtcstats/middleware.js b/react/features/rtcstats/middleware.jsindex eb28651ec6..5b1d9196b7 100644--- a/react/features/rtcstats/middleware.js+++ b/react/features/rtcstats/middleware.js@@ -4,7 +4,7 @@ import { jitsiLocalStorage } from '@jitsi/js-utils';import { getAmplitudeIdentity } from '../analytics';import { CONFERENCE_UNIQUE_ID_SET, E2E_RTT_CHANGED, getConferenceOptions, getRoomName } from '../base/conference';-import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';+import { LIB_WILL_INIT } from '../base/lib-jitsi-meet/actionTypes';import { DOMINANT_SPEAKER_CHANGED, getLocalParticipant } from '../base/participants';import { MiddlewareRegistry } from '../base/redux';import { ADD_FACE_EXPRESSION } from '../face-landmarks/actionTypes';diff --git a/react/features/screen-share/actionTypes.js b/react/features/screen-share/actionTypes.tssimilarity index 100%rename from react/features/screen-share/actionTypes.jsrename to react/features/screen-share/actionTypes.tsdiff --git a/react/features/screenshot-capture/actionTypes.js b/react/features/screenshot-capture/actionTypes.tssimilarity index 100%rename from react/features/screenshot-capture/actionTypes.jsrename to react/features/screenshot-capture/actionTypes.tsdiff --git a/react/features/settings/actionTypes.js b/react/features/settings/actionTypes.tssimilarity index 100%rename from react/features/settings/actionTypes.jsrename to react/features/settings/actionTypes.tsdiff --git a/react/features/share-room/actionTypes.js b/react/features/share-room/actionTypes.tssimilarity index 100%rename from react/features/share-room/actionTypes.jsrename to react/features/share-room/actionTypes.tsdiff --git a/react/features/shared-video/actionTypes.js b/react/features/shared-video/actionTypes.tssimilarity index 100%rename from react/features/shared-video/actionTypes.jsrename to react/features/shared-video/actionTypes.tsdiff --git a/react/features/speaker-stats/actionTypes.js b/react/features/speaker-stats/actionTypes.tssimilarity index 100%rename from react/features/speaker-stats/actionTypes.jsrename to react/features/speaker-stats/actionTypes.tsdiff --git a/react/features/subtitles/actionTypes.js b/react/features/subtitles/actionTypes.tssimilarity index 100%rename from react/features/subtitles/actionTypes.jsrename to react/features/subtitles/actionTypes.tsdiff --git a/react/features/talk-while-muted/actionTypes.js b/react/features/talk-while-muted/actionTypes.tssimilarity index 100%rename from react/features/talk-while-muted/actionTypes.jsrename to react/features/talk-while-muted/actionTypes.tsdiff --git a/react/features/toolbox/actionTypes.js b/react/features/toolbox/actionTypes.tssimilarity index 100%rename from react/features/toolbox/actionTypes.jsrename to react/features/toolbox/actionTypes.tsdiff --git a/react/features/transcribing/actionTypes.js b/react/features/transcribing/actionTypes.tssimilarity index 100%rename from react/features/transcribing/actionTypes.jsrename to react/features/transcribing/actionTypes.tsdiff --git a/react/features/transcribing/reducer.js b/react/features/transcribing/reducer.jsindex 6efa389274..126e51bbd7 100644--- a/react/features/transcribing/reducer.js+++ b/react/features/transcribing/reducer.js@@ -1,10 +1,12 @@+import { ReducerRegistry } from '../base/redux';+import {_TRANSCRIBER_JOINED,_TRANSCRIBER_LEFT,_POTENTIAL_TRANSCRIBER_JOINED,SET_PENDING_TRANSCRIBING_NOTIFICATION_UID-} from '../transcribing/actionTypes';+} from './actionTypes';/*** Returns initial state for transcribing feature part of Redux store.diff --git a/react/features/video-layout/actionTypes.js b/react/features/video-layout/actionTypes.tssimilarity index 100%rename from react/features/video-layout/actionTypes.jsrename to react/features/video-layout/actionTypes.tsdiff --git a/react/features/video-layout/middleware.web.js b/react/features/video-layout/middleware.web.jsindex 11cf9bb229..9179346675 100644--- a/react/features/video-layout/middleware.web.js+++ b/react/features/video-layout/middleware.web.js@@ -10,7 +10,7 @@ import {} from '../base/participants';import { MiddlewareRegistry } from '../base/redux';import { TRACK_ADDED, TRACK_REMOVED, TRACK_STOPPED } from '../base/tracks';-import { PARTICIPANTS_PANE_CLOSE, PARTICIPANTS_PANE_OPEN } from '../participants-pane/actionTypes.js';+import { PARTICIPANTS_PANE_CLOSE, PARTICIPANTS_PANE_OPEN } from '../participants-pane/actionTypes';import './middleware.any';diff --git a/react/features/video-quality/actionTypes.js b/react/features/video-quality/actionTypes.tssimilarity index 100%rename from react/features/video-quality/actionTypes.jsrename to react/features/video-quality/actionTypes.tsdiff --git a/react/features/videosipgw/actionTypes.js b/react/features/videosipgw/actionTypes.tssimilarity index 100%rename from react/features/videosipgw/actionTypes.jsrename to react/features/videosipgw/actionTypes.tsdiff --git a/react/features/virtual-background/actionTypes.js b/react/features/virtual-background/actionTypes.tssimilarity index 100%rename from react/features/virtual-background/actionTypes.jsrename to react/features/virtual-background/actionTypes.tsdiff --git a/tsconfig.json b/tsconfig.jsonnew file mode 100644index 0000000000..37dd4e257d--- /dev/null+++ b/tsconfig.json@@ -0,0 +1,17 @@+{+ "include": ["react/features/**/*.ts"],+ "compilerOptions": {+ "allowSyntheticDefaultImports": true,+ "module": "es6",+ "target": "es6",+ "jsx": "react",+ "lib": [ "ES2020", "DOM" ],+ "noEmit": false,+ "moduleResolution": "Node",+ "strict": true,+ "noImplicitAny": true+ },+ "exclude": [+ "node_modules"+ ]+}diff --git a/webpack.config.js b/webpack.config.jsindex e12a7c8849..4c538c0d9b 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -182,6 +182,10 @@ function getConfig(options = {}) {expandProps: 'start'}} ]+ }, {+ test: /\.tsx?$/,+ exclude: /node_modules/,+ loader: 'ts-loader'} ]},node: {@@ -218,6 +222,10 @@ function getConfig(options = {}) {extensions: ['.web.js',+ // Typescript:+ '.tsx',+ '.ts',+// Webpack defaults:'.js','.json'