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
flow: tame the beast
Saúl Ibarra Corretgéc025c7e13250
diff --git a/react/features/app/actions.js b/react/features/app/actions.jsindex da55c3ea01..75f7b7645d 100644--- a/react/features/app/actions.js+++ b/react/features/app/actions.js@@ -31,7 +31,7 @@ declare var APP: Object;* @returns {Function}*/export function appNavigate(uri: ?string) {- return (dispatch: Dispatch<*>, getState: Function) =>+ return (dispatch: Dispatch<any>, getState: Function) =>_appNavigateToOptionalLocation(dispatch, getState, parseURIString(uri));}@@ -50,7 +50,7 @@ export function appNavigate(uri: ?string) {* @returns {Promise<void>}*/function _appNavigateToMandatoryLocation(- dispatch: Dispatch<*>, getState: Function,+ dispatch: Dispatch<any>, getState: Function,newLocation: Object): Promise<void> {const { room } = newLocation;@@ -111,7 +111,7 @@ function _appNavigateToMandatoryLocation(* @returns {void}*/function _appNavigateToOptionalLocation(- dispatch: Dispatch<*>, getState: Function,+ dispatch: Dispatch<any>, getState: Function,location: Object) {// If the specified location (URI) does not identify a host, use the app's// default.@@ -150,7 +150,7 @@ function _appNavigateToOptionalLocation(* @returns {Promise<Object>}*/function _loadConfig(- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,getState: Function,{ contextRoot, host, protocol, room }) {// XXX As the mobile/React Native app does not employ config on the@@ -211,7 +211,7 @@ function _loadConfig(* @returns {Function}*/export function redirectWithStoredParams(pathname: string) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { locationURL } = getState()['features/base/connection'];const newLocationURL = new URL(locationURL.href);@@ -248,7 +248,7 @@ export function reloadNow() {* @returns {Function}*/export function reloadWithStoredParams() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { locationURL } = getState()['features/base/connection'];const windowLocation = window.location;const oldSearchString = windowLocation.search;diff --git a/react/features/authentication/actions.js b/react/features/authentication/actions.jsindex 1785fb46c3..dca227da22 100644--- a/react/features/authentication/actions.js+++ b/react/features/authentication/actions.js@@ -1,5 +1,7 @@// @flow+import type { Dispatch } from 'redux';+import { appNavigate } from '../app';import { checkIfCanJoin, conferenceLeft } from '../base/conference';import { connectionFailed } from '../base/connection';@@ -33,7 +35,7 @@ export function authenticateAndUpgradeRole(id: string,password: string,conference: Object) {- return (dispatch: Dispatch, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { password: roomPassword }= getState()['features/base/conference'];const process@@ -73,7 +75,7 @@ export function authenticateAndUpgradeRole(* }}*/export function cancelLogin() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {dispatch({ type: CANCEL_LOGIN });// XXX The error associated with CONNECTION_FAILED was marked as@@ -100,7 +102,7 @@ export function cancelLogin() {* @returns {Function}*/export function cancelWaitForOwner() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {dispatch(stopWaitForOwner());// XXX The error associated with CONFERENCE_FAILED was marked as@@ -228,7 +230,7 @@ function _upgradeRoleStarted(thenableWithCancel) {* @returns {Function}*/export function waitForOwner() {- return (dispatch: Dispatch) =>+ return (dispatch: Dispatch<any>) =>dispatch({type: WAIT_FOR_OWNER,handler: () => dispatch(checkIfCanJoin()),diff --git a/react/features/authentication/components/LoginDialog.native.js b/react/features/authentication/components/LoginDialog.native.jsindex 239bd3100c..e1357fc639 100644--- a/react/features/authentication/components/LoginDialog.native.js+++ b/react/features/authentication/components/LoginDialog.native.js@@ -3,6 +3,7 @@import React, { Component } from 'react';import { Text, TextInput, View } from 'react-native';import { connect as reduxConnect } from 'react-redux';+import type { Dispatch } from 'redux';import { connect, toJid } from '../../base/connection';import {@@ -59,7 +60,7 @@ type Props = {/*** Redux store dispatch method.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Invoked to obtain translated strings.diff --git a/react/features/authentication/components/WaitForOwnerDialog.native.js b/react/features/authentication/components/WaitForOwnerDialog.native.jsindex fc0e704991..7ac1461c83 100644--- a/react/features/authentication/components/WaitForOwnerDialog.native.js+++ b/react/features/authentication/components/WaitForOwnerDialog.native.js@@ -2,6 +2,7 @@import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { ConfirmDialog } from '../../base/dialog';import { translate } from '../../base/i18n';@@ -21,7 +22,7 @@ type Props = {/*** Redux store dispatch function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Invoked to obtain translated strings.diff --git a/react/features/authentication/middleware.js b/react/features/authentication/middleware.jsindex 9c3c49f250..bb0ac57db9 100644--- a/react/features/authentication/middleware.js+++ b/react/features/authentication/middleware.js@@ -1,5 +1,7 @@// @flow+import type { Dispatch } from 'redux';+import { appNavigate } from '../app';import {CONFERENCE_FAILED,@@ -160,7 +162,7 @@ function _clearExistingWaitForOwnerTimeout(* @param {Object} store - The redux store.* @returns {void}*/-function _hideLoginDialog({ dispatch }: { dispatch: Dispatch<*> }) {+function _hideLoginDialog({ dispatch }: { dispatch: Dispatch<any> }) {dispatch(hideDialog(LoginDialog));}diff --git a/react/features/base/app/actions.js b/react/features/base/app/actions.jsindex 6cb05768cf..f9d0615097 100644--- a/react/features/base/app/actions.js+++ b/react/features/base/app/actions.js@@ -1,5 +1,7 @@// @flow+import type { Dispatch } from 'redux';+import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from './actionTypes';declare var APP;@@ -14,7 +16,7 @@ declare var APP;* }}*/export function appWillMount(app: Object) {- return (dispatch: Dispatch<*>) => {+ return (dispatch: Dispatch<any>) => {dispatch({type: APP_WILL_MOUNT,appdiff --git a/react/features/base/color-scheme/ColorSchemeRegistry.js b/react/features/base/color-scheme/ColorSchemeRegistry.jsindex 5b7337e883..69bcb5bae6 100644--- a/react/features/base/color-scheme/ColorSchemeRegistry.js+++ b/react/features/base/color-scheme/ColorSchemeRegistry.js@@ -122,8 +122,11 @@ class ColorSchemeRegistry {} else if (typeof styleValue === 'function') {// The value is a function, which indicates that it's a// dynamic, schemed color we need to resolve.+ // $FlowExpectedError+ const value = styleValue();+schemedStyle[styleName]- = this._getColor(stateful, componentName, styleValue());+ = this._getColor(stateful, componentName, value);}}diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.jsindex aa669aec54..81643389e8 100644--- a/react/features/base/conference/actions.js+++ b/react/features/base/conference/actions.js@@ -299,7 +299,7 @@ export function conferenceSubjectChanged(subject: string) {* @returns {Function}*/function _conferenceWillJoin(conference: Object) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const localTracks= getLocalTracks(getState()['features/base/tracks']).map(t => t.jitsiTrack);@@ -565,7 +565,7 @@ export function setFollowMe(enabled: boolean) {* @returns {Function}*/export function setLastN(lastN: ?number) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {if (typeof lastN === 'undefined') {const config = getState()['features/base/config'];@@ -618,7 +618,7 @@ export function setPassword(conference: Object,method: Function,password: string) {- return (dispatch: Dispatch<*>, getState: Function): ?Promise<void> => {+ return (dispatch: Dispatch<any>, getState: Function): ?Promise<void> => {switch (method) {case conference.join: {let state = getState()['features/base/conference'];@@ -721,7 +721,7 @@ export function setRoom(room: ?string) {*/export function setStartMutedPolicy(startAudioMuted: boolean, startVideoMuted: boolean) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const conference = getCurrentConference(getState());conference && conference.setStartMutedPolicy({@@ -740,7 +740,7 @@ export function setStartMutedPolicy(* @returns {Function}*/export function toggleAudioOnly() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { audioOnly } = getState()['features/base/conference'];return dispatch(setAudioOnly(!audioOnly, true));@@ -754,7 +754,7 @@ export function toggleAudioOnly() {* @returns {void}*/export function setSubject(subject: string = '') {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { conference } = getState()['features/base/conference'];if (conference) {diff --git a/react/features/base/config/actions.js b/react/features/base/config/actions.jsindex 0d4dc01f15..4f93823b32 100644--- a/react/features/base/config/actions.js+++ b/react/features/base/config/actions.js@@ -59,7 +59,7 @@ export function loadConfigError(error: Error, locationURL: URL) {* @returns {Function}*/export function setConfig(config: Object = {}) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { locationURL } = getState()['features/base/connection'];// Now that the loading of the config was successful override the values@@ -99,7 +99,7 @@ export function setConfig(config: Object = {}) {* @returns {Function}*/export function storeConfig(baseURL: string, config: Object) {- return (dispatch: Dispatch<*>) => {+ return (dispatch: Dispatch<any>) => {// Try to store the configuration in localStorage. If the deployment// specified 'getroom' as a function, for example, it does not make// sense to and it will not be stored.diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.jsindex 55599b27c0..f96cb81889 100644--- a/react/features/base/connection/actions.native.js+++ b/react/features/base/connection/actions.native.js@@ -76,7 +76,7 @@ export type ConnectionFailedError = {* @returns {Function}*/export function connect(id: ?string, password: ?string) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const state = getState();const options = _constructOptions(state);const { issuer, jwt } = state['features/base/jwt'];@@ -322,7 +322,7 @@ function _constructOptions(state) {* @returns {Function}*/export function disconnect() {- return (dispatch: Dispatch<*>, getState: Function): Promise<void> => {+ return (dispatch: Dispatch<any>, getState: Function): Promise<void> => {const state = getState();// The conference we have already joined or are joining.diff --git a/react/features/base/connection/actions.web.js b/react/features/base/connection/actions.web.jsindex 35c9792029..4f23e1322f 100644--- a/react/features/base/connection/actions.web.js+++ b/react/features/base/connection/actions.web.js@@ -19,7 +19,7 @@ export {* @returns {Promise<JitsiConnection>}*/export function connect() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {// XXX Lib-jitsi-meet does not accept uppercase letters.const room = getState()['features/base/conference'].room.toLowerCase();diff --git a/react/features/base/dialog/actions.js b/react/features/base/dialog/actions.jsindex 7157191d24..31075f028c 100644--- a/react/features/base/dialog/actions.js+++ b/react/features/base/dialog/actions.js@@ -1,4 +1,6 @@-/* @flow */+// @flow++import type { Dispatch } from 'redux';import { HIDE_DIALOG, OPEN_DIALOG } from './actionTypes';import { isDialogOpen } from './functions';@@ -53,7 +55,7 @@ export function openDialog(component: Object, componentProps: ?Object) {* @returns {Function}*/export function toggleDialog(component: Object, componentProps: ?Object) {- return (dispatch: Dispatch, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {if (isDialogOpen(getState, component)) {dispatch(hideDialog(component));} else {diff --git a/react/features/base/dialog/components/AbstractDialog.js b/react/features/base/dialog/components/AbstractDialog.jsindex 2a30bcf782..0c4a23abee 100644--- a/react/features/base/dialog/components/AbstractDialog.js+++ b/react/features/base/dialog/components/AbstractDialog.js@@ -1,6 +1,7 @@// @flowimport { Component } from 'react';+import type { Dispatch } from 'redux';import { hideDialog } from '../actions';import type { DialogProps } from '../constants';@@ -8,13 +9,12 @@ import type { DialogProps } from '../constants';/*** The type of the React {@code Component} props of {@link AbstractDialog}.*/-export type Props = {- ...DialogProps,+export type Props = DialogProps & {/*** Used to show/hide the dialog on cancel.*/- dispatch: Dispatch<*>+ dispatch: Dispatch<any>};/**diff --git a/react/features/base/dialog/components/native/BaseDialog.js b/react/features/base/dialog/components/native/BaseDialog.jsindex 9326fae22c..4bf23522e1 100644--- a/react/features/base/dialog/components/native/BaseDialog.js+++ b/react/features/base/dialog/components/native/BaseDialog.js@@ -16,8 +16,7 @@ import AbstractDialog, {} from '../AbstractDialog';import { brandedDialog as styles } from './styles';-export type Props = {- ...AbstractProps,+export type Props = AbstractProps & {/*** The color-schemed stylesheet of the feature.diff --git a/react/features/base/dialog/components/native/BaseSubmitDialog.js b/react/features/base/dialog/components/native/BaseSubmitDialog.jsindex 734c8f92b0..1ec1c9c365 100644--- a/react/features/base/dialog/components/native/BaseSubmitDialog.js+++ b/react/features/base/dialog/components/native/BaseSubmitDialog.js@@ -10,8 +10,7 @@ import {brandedDialog} from './styles';-type Props = {- ...BaseProps,+type Props = BaseProps & {/*** The color-schemed stylesheet of the feature.@@ -83,7 +82,7 @@ class BaseSubmitDialog<P: Props, S: *> extends BaseDialog<P, S> {_onCancel: () => void;- _onSubmit: ?string => boolean;+ _onSubmit: () => boolean;_renderHTML: string => Object | stringdiff --git a/react/features/base/dialog/components/native/BottomSheet.js b/react/features/base/dialog/components/native/BottomSheet.jsindex 1d4be81458..2ae6bdea46 100644--- a/react/features/base/dialog/components/native/BottomSheet.js+++ b/react/features/base/dialog/components/native/BottomSheet.js@@ -107,4 +107,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(BottomSheet);diff --git a/react/features/base/dialog/components/native/ConfirmDialog.js b/react/features/base/dialog/components/native/ConfirmDialog.jsindex 7ffd6a37b1..953244579e 100644--- a/react/features/base/dialog/components/native/ConfirmDialog.js+++ b/react/features/base/dialog/components/native/ConfirmDialog.js@@ -13,8 +13,7 @@ import { type Props as BaseProps } from './BaseDialog';import BaseSubmitDialog from './BaseSubmitDialog';import { brandedDialog } from './styles';-type Props = {- ...BaseProps,+type Props = BaseProps & {/*** The color-schemed stylesheet of the feature.diff --git a/react/features/base/dialog/components/native/CustomDialog.js b/react/features/base/dialog/components/native/CustomDialog.jsindex 9544454024..65b716456e 100644--- a/react/features/base/dialog/components/native/CustomDialog.js+++ b/react/features/base/dialog/components/native/CustomDialog.js@@ -21,4 +21,5 @@ class CustomDialog extends BaseDialog<Props, *> {}}+// $FlowExpectedErrorexport default connect(_abstractMapStateToProps)(CustomDialog);diff --git a/react/features/base/dialog/components/native/CustomSubmitDialog.js b/react/features/base/dialog/components/native/CustomSubmitDialog.jsindex 86ce8287aa..ca163dffda 100644--- a/react/features/base/dialog/components/native/CustomSubmitDialog.js+++ b/react/features/base/dialog/components/native/CustomSubmitDialog.js@@ -9,9 +9,7 @@ import { _abstractMapStateToProps } from '../../functions';import { type Props as BaseProps } from './BaseDialog';import BaseSubmitDialog from './BaseSubmitDialog';-type Props = {- ...BaseProps,-+type Props = BaseProps & {t: Function}diff --git a/react/features/base/dialog/components/native/InputDialog.js b/react/features/base/dialog/components/native/InputDialog.jsindex eecfc08769..543e55054f 100644--- a/react/features/base/dialog/components/native/InputDialog.js+++ b/react/features/base/dialog/components/native/InputDialog.js@@ -18,8 +18,7 @@ import {inputDialog as styles} from './styles';-type Props = {- ...BaseProps,+type Props = BaseProps & {/*** The color-schemed stylesheet of the feature.diff --git a/react/features/base/dialog/components/web/Dialog.js b/react/features/base/dialog/components/web/Dialog.jsindex 19a3f1e40e..f9efbf23d1 100644--- a/react/features/base/dialog/components/web/Dialog.js+++ b/react/features/base/dialog/components/web/Dialog.js@@ -10,8 +10,7 @@ import StatelessDialog from './StatelessDialog';/*** The type of the React {@code Component} props of {@link Dialog}.*/-type Props = {- ...AbstractDialogProps,+type Props = AbstractDialogProps & {/*** Whether the dialog is modal. This means clicking on the blanket will@@ -44,7 +43,7 @@ class Dialog extends AbstractDialog<Props, State> {* @param {Object} props - The read-only properties with which the new* instance is to be initialized.*/- constructor(props) {+ constructor(props: Props) {super(props);// Bind event handlers so they are only bound once per instance.@@ -65,6 +64,7 @@ class Dialog extends AbstractDialog<Props, State> {onSubmit: this._onSubmit};+ // $FlowExpectedErrordelete props.dispatch;return <StatelessDialog { ...props } />;@@ -84,4 +84,5 @@ class Dialog extends AbstractDialog<Props, State> {_onSubmit: (?string) => void;}+// $FlowExpectedErrorexport default connect()(Dialog);diff --git a/react/features/base/dialog/constants.js b/react/features/base/dialog/constants.jsindex 51ade888b0..5ec6da131a 100644--- a/react/features/base/dialog/constants.js+++ b/react/features/base/dialog/constants.js@@ -5,27 +5,27 @@ export type DialogProps = {/*** Whether cancel button is disabled. Enabled by default.*/- cancelDisabled: boolean,+ cancelDisabled: ?boolean,/*** Optional i18n key to change the cancel button title.*/- cancelKey: string,+ cancelKey: ?string,/*** The React {@code Component} children which represents the dialog's body.*/- children: React$Node,+ children: ?React$Node,/*** Is ok button enabled/disabled. Enabled by default.*/- okDisabled: boolean,+ okDisabled: ?boolean,/*** Optional i18n key to change the ok button title.*/- okKey: string,+ okKey: ?string,/*** The handler for onCancel event.@@ -47,14 +47,14 @@ export type DialogProps = {/*** Key to use for showing a title.*/- titleKey: string,+ titleKey: ?string,/*** The string to use as a title instead of {@code titleKey}. If a truthy* value is specified, it takes precedence over {@code titleKey} i.e.* the latter is unused.*/- titleString: string+ titleString: ?string};/**diff --git a/react/features/base/lib-jitsi-meet/actions.js b/react/features/base/lib-jitsi-meet/actions.jsindex 2db316bebe..7fb49edc74 100644--- a/react/features/base/lib-jitsi-meet/actions.js+++ b/react/features/base/lib-jitsi-meet/actions.js@@ -20,7 +20,7 @@ declare var APP: Object;* @returns {Function}*/export function disposeLib() {- return (dispatch: Dispatch<*>) => {+ return (dispatch: Dispatch<any>) => {dispatch({ type: LIB_WILL_DISPOSE });// TODO Currently, lib-jitsi-meet doesn't have the functionality to@@ -36,7 +36,7 @@ export function disposeLib() {* @returns {Function}*/export function initLib() {- return (dispatch: Dispatch<*>, getState: Function): void => {+ return (dispatch: Dispatch<any>, getState: Function): void => {const config = getState()['features/base/config'];if (!config) {diff --git a/react/features/base/media/actions.js b/react/features/base/media/actions.jsindex 7eab0977f7..a2a558d21e 100644--- a/react/features/base/media/actions.js+++ b/react/features/base/media/actions.js@@ -99,7 +99,7 @@ export function setVideoMuted(muted: boolean,authority: number = VIDEO_MUTISM_AUTHORITY.USER,ensureTrack: boolean = false) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const oldValue = getState()['features/base/media'].video.muted;// eslint-disable-next-line no-bitwisediff --git a/react/features/base/media/components/AbstractVideoTrack.js b/react/features/base/media/components/AbstractVideoTrack.jsindex 557ff933b8..9a0e1fda87 100644--- a/react/features/base/media/components/AbstractVideoTrack.js+++ b/react/features/base/media/components/AbstractVideoTrack.js@@ -1,6 +1,7 @@/* @flow */import React, { Component } from 'react';+import type { Dispatch } from 'redux';import { trackVideoStarted } from '../../tracks';@@ -15,7 +16,7 @@ export type Props = {/*** The Redux dispatch function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Callback to invoke when the {@link Video} of {@code AbstractVideoTrack}diff --git a/react/features/base/media/components/native/VideoTrack.js b/react/features/base/media/components/native/VideoTrack.jsindex 3fc2ee4432..3d2c76cbdc 100644--- a/react/features/base/media/components/native/VideoTrack.js+++ b/react/features/base/media/components/native/VideoTrack.js@@ -29,4 +29,5 @@ class VideoTrack extends AbstractVideoTrack<Props> {}}+// $FlowExpectedErrorexport default connect()(VideoTrack);diff --git a/react/features/base/media/components/native/VideoTransform.js b/react/features/base/media/components/native/VideoTransform.jsindex 4ee476b038..ae21d81c7d 100644--- a/react/features/base/media/components/native/VideoTransform.js+++ b/react/features/base/media/components/native/VideoTransform.js@@ -5,6 +5,8 @@ import { PanResponder, PixelRatio, View } from 'react-native';import { connect } from 'react-redux';import { type Dispatch } from 'redux';+import type { PanResponderInstance } from 'PanResponder';+import { storeVideoTransform } from '../../actions';import styles from './styles';@@ -117,7 +119,7 @@ class VideoTransform extends Component<Props, State> {/*** The gesture handler object.*/- gestureHandlers: PanResponder;+ gestureHandlers: PanResponderInstance;/*** The initial distance of the fingers on pinch start.@@ -190,7 +192,7 @@ class VideoTransform extends Component<Props, State> {** @inheritdoc*/- componentDidUpdate(prevProps, prevState) {+ componentDidUpdate(prevProps: Props, prevState: State) {if (prevProps.streamId !== this.props.streamId) {this._storeTransform(prevProps.streamId, prevState.transform);this._restoreTransform(this.props.streamId);@@ -687,7 +689,7 @@ class VideoTransform extends Component<Props, State> {* _onUnmount: Function* }}*/-function _mapDispatchToProps(dispatch: Dispatch<*>) {+function _mapDispatchToProps(dispatch: Dispatch<any>) {return {/*** Dispatches actions to store the last applied transform to a video.@@ -725,4 +727,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps, _mapDispatchToProps)(VideoTransform);diff --git a/react/features/base/media/components/web/VideoTrack.js b/react/features/base/media/components/web/VideoTrack.jsindex e157ae378b..57de153b2b 100644--- a/react/features/base/media/components/web/VideoTrack.js+++ b/react/features/base/media/components/web/VideoTrack.js@@ -11,8 +11,7 @@ import Video from './Video';/*** The type of the React {@code Component} props of {@link VideoTrack}.*/-type Props = {- ...AbstractVideoTrackProps,+type Props = AbstractVideoTrackProps & {/*** CSS classes to add to the video element.@@ -64,4 +63,5 @@ class VideoTrack extends AbstractVideoTrack<Props> {_onVideoPlaying: () => void;}+// $FlowExpectedErrorexport default connect()(VideoTrack);diff --git a/react/features/base/react/Types.js b/react/features/base/react/Types.jsindex bd2f223e6d..29ccabac46 100644--- a/react/features/base/react/Types.js+++ b/react/features/base/react/Types.js@@ -20,7 +20,7 @@ export type Item = {/*** An optional react element to append to the end of the Item.*/- elementAfter?: ?ComponentType<any>,+ elementAfter?: ?React$Node,/*** Unique ID of the item.diff --git a/react/features/base/react/components/AbstractContainer.js b/react/features/base/react/components/AbstractContainer.jsindex 726a29a02f..08309b6a15 100644--- a/react/features/base/react/components/AbstractContainer.js+++ b/react/features/base/react/components/AbstractContainer.js@@ -20,7 +20,7 @@ export type Props = {/*** React Elements to display within the component.*/- children: React$Node | Object,+ children: React$Node,/*** The event handler/listener to be invoked when thisdiff --git a/react/features/base/react/components/native/AvatarListItem.js b/react/features/base/react/components/native/AvatarListItem.jsindex 86b31e2f06..490ffc8f18 100644--- a/react/features/base/react/components/native/AvatarListItem.js+++ b/react/features/base/react/components/native/AvatarListItem.js@@ -32,7 +32,7 @@ type Props = {/*** Children of the component.*/- children?: ?React$Element<*>,+ children?: React$Node,/*** item containing data to be rendered@@ -70,6 +70,44 @@ export default class AvatarListItem extends Component<Props> {this._renderItemLine = this._renderItemLine.bind(this);}+ /**+ * Helper function to render the content in the avatar container.+ *+ * @returns {React$Element}+ */+ _getAvatarContent() {+ const {+ avatarSize = AVATAR_SIZE,+ avatarTextStyle+ } = this.props;+ const { avatar, title } = this.props.item;+ const isAvatarURL = Boolean(avatar && avatar.match(/^http[s]*:\/\//i));++ if (isAvatarURL) {+ return (+ <Avatar+ size = { avatarSize }+ uri = { avatar } />+ );+ }++ if (avatar && !isAvatarURL) {+ return (+ <Icon name = { avatar } />+ );+ }++ return (+ <Text+ style = { [+ styles.avatarContent,+ avatarTextStyle+ ] }>+ { title.substr(0, 1).toUpperCase() }+ </Text>+ );+ }+/*** Implements {@code Component#render}.*@@ -78,10 +116,9 @@ export default class AvatarListItem extends Component<Props> {render() {const {avatarSize = AVATAR_SIZE,- avatarStyle,- avatarTextStyle+ avatarStyle} = this.props;- const { avatar, colorBase, lines, title } = this.props.item;+ const { colorBase, lines, title } = this.props.item;const avatarStyles = {...styles.avatar,...this._getAvatarColor(colorBase),@@ -91,8 +128,6 @@ export default class AvatarListItem extends Component<Props> {width: avatarSize};- const isAvatarURL = Boolean(avatar && avatar.match(/^http[s]*:\/\//i));-return (<ContaineronClick = { this.props.onPress }@@ -100,26 +135,7 @@ export default class AvatarListItem extends Component<Props> {underlayColor = { UNDERLAY_COLOR }><Container style = { styles.avatarContainer }><Container style = { avatarStyles }>- {- isAvatarURL && <Avatar- size = { avatarSize }- uri = { avatar } />- }-- {- Boolean(avatar && !isAvatarURL) && <Icon- name = { avatar } />- }-- {- !avatar && <Text- style = { [- styles.avatarContent,- avatarTextStyle- ] }>- { title.substr(0, 1).toUpperCase() }- </Text>- }+ { this._getAvatarContent() }</Container></Container><Container style = { styles.listItemDetails }>diff --git a/react/features/base/react/components/native/BackButton.js b/react/features/base/react/components/native/BackButton.jsindex 87c827153b..58d0cbd04d 100644--- a/react/features/base/react/components/native/BackButton.js+++ b/react/features/base/react/components/native/BackButton.js@@ -68,4 +68,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(BackButton);diff --git a/react/features/base/react/components/native/Header.js b/react/features/base/react/components/native/Header.jsindex 08c0dd3ad5..523d13cc6d 100644--- a/react/features/base/react/components/native/Header.js+++ b/react/features/base/react/components/native/Header.js@@ -165,4 +165,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(Header);diff --git a/react/features/base/react/components/native/PagedList.js b/react/features/base/react/components/native/PagedList.jsindex 53f12e1f77..3e9cb24046 100644--- a/react/features/base/react/components/native/PagedList.js+++ b/react/features/base/react/components/native/PagedList.js@@ -283,4 +283,5 @@ class PagedList extends Component<Props, State> {}}+// $FlowExpectedErrorexport default connect()(PagedList);diff --git a/react/features/base/react/components/web/Watermarks.js b/react/features/base/react/components/web/Watermarks.jsindex 47e70f131c..7e39a157a9 100644--- a/react/features/base/react/components/web/Watermarks.js+++ b/react/features/base/react/components/web/Watermarks.js@@ -242,4 +242,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(translate(Watermarks));diff --git a/react/features/base/redux/MiddlewareRegistry.js b/react/features/base/redux/MiddlewareRegistry.jsindex ca39c13b8c..590db3972d 100644--- a/react/features/base/redux/MiddlewareRegistry.js+++ b/react/features/base/redux/MiddlewareRegistry.js@@ -32,14 +32,8 @@ class MiddlewareRegistry {* @returns {Middleware}*/applyMiddleware(...additional: Array<Middleware<*, *>>) {- // XXX The explicit definition of the local variable middlewares is to- // satisfy flow.- const middlewares = [- ...this._elements,- ...additional- ];-- return applyMiddleware(...middlewares);+ // $FlowExpectedError+ return applyMiddleware(...this._elements, ...additional);}/**diff --git a/react/features/base/redux/ReducerRegistry.js b/react/features/base/redux/ReducerRegistry.jsindex 18628f5bd8..fb5c9d405c 100644--- a/react/features/base/redux/ReducerRegistry.js+++ b/react/features/base/redux/ReducerRegistry.js@@ -38,6 +38,7 @@ class ReducerRegistry {* @returns {Function}*/combineReducers(additional: NameReducerMap<*, *> = {}) {+ // $FlowExpectedErrorreturn combineReducers({...this._elements,...additionaldiff --git a/react/features/base/redux/StateListenerRegistry.js b/react/features/base/redux/StateListenerRegistry.jsindex 7bfa273eb3..a5f35abb67 100644--- a/react/features/base/redux/StateListenerRegistry.js+++ b/react/features/base/redux/StateListenerRegistry.js@@ -1,5 +1,7 @@// @flow+import type { Store } from 'redux';+const logger = require('jitsi-meet-logger').getLogger(__filename);/**@@ -16,7 +18,8 @@ const logger = require('jitsi-meet-logger').getLogger(__filename);* invoked only if {@code prevSelection} and {@code selection} are different.* Immutable!*/-type Listener = (selection: any, store: Store, prevSelection: any) => void;+type Listener+ = (selection: any, store: Store<*, *>, prevSelection: any) => void;/*** The type selector supported for registration with@@ -65,7 +68,10 @@ class StateListenerRegistry {*/_selectorListeners: Set<SelectorListener> = new Set();- _listener: (Store) => void;+ _listener: ({+ prevSelections: Map<SelectorListener, any>,+ store: Store<*, *>+ }) => void;/*** Invoked by a specific redux store any time an action is dispatched, and@@ -78,7 +84,7 @@ class StateListenerRegistry {*/_listener({ prevSelections, store }: {prevSelections: Map<SelectorListener, any>,- store: Store+ store: Store<*, *>}) {for (const selectorListener of this._selectorListeners) {const prevSelection = prevSelections.get(selectorListener);@@ -129,7 +135,7 @@ class StateListenerRegistry {* {@code StateListenerRegistry} is to {@code subscribe}.* @returns {void}*/- subscribe(store: Store) {+ subscribe(store: Store<*, *>) {// XXX If StateListenerRegistry is not utilized by the app to listen to// state changes, do not bother subscribing to the store at all.if (this._selectorListeners.size) {diff --git a/react/features/base/responsive-ui/actions.js b/react/features/base/responsive-ui/actions.jsindex 5edf676b4b..86530cd534 100644--- a/react/features/base/responsive-ui/actions.js+++ b/react/features/base/responsive-ui/actions.js@@ -30,7 +30,7 @@ const REDUCED_UI_THRESHOLD = 300;* }}*/export function setAspectRatio(width: number, height: number): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {// Don't change the aspect ratio if width and height are the same, that// is, if we transition to a 1:1 aspect ratio.if (width !== height) {@@ -60,7 +60,7 @@ export function setAspectRatio(width: number, height: number): Function {* }}*/export function setReducedUI(width: number, height: number): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const reducedUI = Math.min(width, height) < REDUCED_UI_THRESHOLD;if (reducedUI !== getState()['features/base/responsive-ui'].reducedUI) {diff --git a/react/features/base/responsive-ui/components/AspectRatioDetector.js b/react/features/base/responsive-ui/components/AspectRatioDetector.jsindex c3fb3d14d5..611f216ab9 100644--- a/react/features/base/responsive-ui/components/AspectRatioDetector.js+++ b/react/features/base/responsive-ui/components/AspectRatioDetector.js@@ -52,7 +52,7 @@ class AspectRatioDetector extends Component<Props> {* _onDimensionsChanged: Function* }}*/-function _mapDispatchToProps(dispatch: Dispatch<*>) {+function _mapDispatchToProps(dispatch: Dispatch<any>) {return {/*** Handles the "on dimensions changed" event and dispatches aspect ratio@@ -69,4 +69,5 @@ function _mapDispatchToProps(dispatch: Dispatch<*>) {};}+// $FlowExpectedErrorexport default connect(undefined, _mapDispatchToProps)(AspectRatioDetector);diff --git a/react/features/base/responsive-ui/components/ReducedUIDetector.js b/react/features/base/responsive-ui/components/ReducedUIDetector.jsindex 7b3aafc0a7..2af6a329cd 100644--- a/react/features/base/responsive-ui/components/ReducedUIDetector.js+++ b/react/features/base/responsive-ui/components/ReducedUIDetector.js@@ -53,7 +53,7 @@ class ReducedUIDetector extends Component<Props> {* _onDimensionsChanged: Function* }}*/-function _mapDispatchToProps(dispatch: Dispatch<*>) {+function _mapDispatchToProps(dispatch: Dispatch<any>) {return {/*** Handles the "on dimensions changed" event and dispatches the@@ -70,4 +70,5 @@ function _mapDispatchToProps(dispatch: Dispatch<*>) {};}+// $FlowExpectedErrorexport default connect(undefined, _mapDispatchToProps)(ReducedUIDetector);diff --git a/react/features/base/sounds/components/SoundCollection.js b/react/features/base/sounds/components/SoundCollection.jsindex 36676625dd..cdbf773c05 100644--- a/react/features/base/sounds/components/SoundCollection.js+++ b/react/features/base/sounds/components/SoundCollection.js@@ -153,4 +153,5 @@ export function _mapDispatchToProps(dispatch: Function) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps, _mapDispatchToProps)(SoundCollection);diff --git a/react/features/base/styles/functions.js b/react/features/base/styles/functions.jsindex 90ba79f9e6..1e4703bddd 100644--- a/react/features/base/styles/functions.js+++ b/react/features/base/styles/functions.js@@ -46,7 +46,7 @@ const _WELL_KNOWN_NUMBER_PROPERTIES = [ 'height', 'width' ];* @returns {StyleType} - The merged styles.*/export function combineStyles(a: StyleType, b: StyleType): StyleType {- const result = [];+ const result: Array<StyleSheet> = [];if (a) {if (Array.isArray(a)) {diff --git a/react/features/base/testing/components/TestConnectionInfo.js b/react/features/base/testing/components/TestConnectionInfo.jsindex 82e3de5543..a54fa8d20d 100644--- a/react/features/base/testing/components/TestConnectionInfo.js+++ b/react/features/base/testing/components/TestConnectionInfo.js@@ -89,7 +89,7 @@ class TestConnectionInfo extends Component<Props, State> {* @param {Object} props - The read-only properties with which the new* instance is to be initialized.*/- constructor(props: Object) {+ constructor(props: Props) {super(props);this._onStatsUpdated = this._onStatsUpdated.bind(this);@@ -142,7 +142,7 @@ class TestConnectionInfo extends Component<Props, State> {* @inheritdoc* returns {void}*/- componentDidUpdate(prevProps) {+ componentDidUpdate(prevProps: Props) {if (prevProps._localUserId !== this.props._localUserId) {statsEmitter.unsubscribeToClientStats(prevProps._localUserId, this._onStatsUpdated);@@ -215,4 +215,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(TestConnectionInfo);diff --git a/react/features/base/testing/components/TestHint.ios.js b/react/features/base/testing/components/TestHint.ios.jsindex 64e0c6b807..d49765b93b 100644--- a/react/features/base/testing/components/TestHint.ios.js+++ b/react/features/base/testing/components/TestHint.ios.js@@ -34,4 +34,5 @@ class TestHint extends Component<TestHintProps> {}}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(TestHint);diff --git a/react/features/base/toolbox/components/AbstractToolboxItem.js b/react/features/base/toolbox/components/AbstractToolboxItem.jsindex 540f827d53..0e53c770be 100644--- a/react/features/base/toolbox/components/AbstractToolboxItem.js+++ b/react/features/base/toolbox/components/AbstractToolboxItem.js@@ -201,6 +201,7 @@ export default class AbstractToolboxItem<P : Props> extends Component<P> {*/_renderItem() {// To be implemented by a subclass.+ return null;}/**diff --git a/react/features/calendar-sync/actions.native.js b/react/features/calendar-sync/actions.native.jsindex 64536e8557..1ba29b2734 100644--- a/react/features/calendar-sync/actions.native.js+++ b/react/features/calendar-sync/actions.native.js@@ -1,6 +1,8 @@// @flowimport { generateRoomWithoutSeparator } from 'js-utils/random';+import type { Dispatch } from 'redux';+import { getDefaultURL } from '../app';import { openDialog } from '../base/dialog';@@ -35,7 +37,7 @@ export function openUpdateCalendarEventDialog(eventId: string) {* @returns {Function}*/export function updateCalendarEvent(eventId: string) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const defaultUrl = getDefaultURL(getState);const roomName = generateRoomWithoutSeparator();diff --git a/react/features/calendar-sync/actions.web.js b/react/features/calendar-sync/actions.web.jsindex 17674b33f0..338d17e821 100644--- a/react/features/calendar-sync/actions.web.js+++ b/react/features/calendar-sync/actions.web.js@@ -1,6 +1,7 @@// @flowimport { generateRoomWithoutSeparator } from 'js-utils/random';+import type { Dispatch } from 'redux';import { loadGoogleAPI } from '../google-api';@@ -197,7 +198,7 @@ export function setIntegrationReady(integrationType: string) {* @returns {Function}*/export function signIn(calendarType: string): Function {- return (dispatch: Dispatch<*>) => {+ return (dispatch: Dispatch<any>) => {const integration = _getCalendarIntegration(calendarType);if (!integration) {@@ -229,7 +230,7 @@ export function signIn(calendarType: string): Function {* @returns {Function}*/export function updateCalendarEvent(id: string, calendarId: string): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { integrationType } = getState()['features/calendar-sync'];const integration = _getCalendarIntegration(integrationType);@@ -276,7 +277,7 @@ export function updateCalendarEvent(id: string, calendarId: string): Function {* @returns {Function}*/export function updateProfile(calendarType: string): Function {- return (dispatch: Dispatch<*>) => {+ return (dispatch: Dispatch<any>) => {const integration = _getCalendarIntegration(calendarType);if (!integration) {diff --git a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js b/react/features/calendar-sync/components/AddMeetingUrlButton.web.jsindex 5645a987eb..6a77eb492a 100644--- a/react/features/calendar-sync/components/AddMeetingUrlButton.web.js+++ b/react/features/calendar-sync/components/AddMeetingUrlButton.web.js@@ -1,8 +1,9 @@// @flow+import Tooltip from '@atlaskit/tooltip';import React, { Component } from 'react';import { connect } from 'react-redux';-import Tooltip from '@atlaskit/tooltip';+import type { Dispatch } from 'redux';import {createCalendarClickedEvent,@@ -25,7 +26,7 @@ type Props = {/*** Invoked to add a meeting URL to a calendar event.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The ID of the calendar event that will have a meeting URL added on click.diff --git a/react/features/calendar-sync/components/CalendarListContent.native.js b/react/features/calendar-sync/components/CalendarListContent.native.jsindex d6d0fd97b6..44ede1f601 100644--- a/react/features/calendar-sync/components/CalendarListContent.native.js+++ b/react/features/calendar-sync/components/CalendarListContent.native.js@@ -108,7 +108,7 @@ class CalendarListContent extends Component<Props> {);}- _onPress: (string, string) => Function;+ _onPress: (string, ?string) => Function;/*** Handles the list's navigate action.diff --git a/react/features/calendar-sync/components/CalendarListContent.web.js b/react/features/calendar-sync/components/CalendarListContent.web.jsindex e718803557..2aca10fba2 100644--- a/react/features/calendar-sync/components/CalendarListContent.web.js+++ b/react/features/calendar-sync/components/CalendarListContent.web.js@@ -59,7 +59,7 @@ class CalendarListContent extends Component<Props> {** @inheritdoc*/- constructor(props) {+ constructor(props: Props) {super(props);// Bind event handlers so they are only bound once per instance.@@ -114,7 +114,7 @@ class CalendarListContent extends Component<Props> {this._onPress(url, 'calendar.meeting.join');}- _onPress: (string, string) => Function;+ _onPress: (string, ?string) => Function;/*** Handles the list's navigate action.@@ -173,5 +173,7 @@ function _mapStateToProps(state: Object) {}export default isCalendarEnabled()++ // $FlowExpectedError? connect(_mapStateToProps)(CalendarListContent): undefined;diff --git a/react/features/calendar-sync/functions.native.js b/react/features/calendar-sync/functions.native.jsindex aa2260f300..f16d51ccb5 100644--- a/react/features/calendar-sync/functions.native.js+++ b/react/features/calendar-sync/functions.native.js@@ -2,6 +2,7 @@import { NativeModules, Platform } from 'react-native';import RNCalendarEvents from 'react-native-calendar-events';+import type { Store } from 'redux';import { getShareInfoText } from '../invite';@@ -22,7 +23,7 @@ const logger = require('jitsi-meet-logger').getLogger(__filename);* @returns {Promise<*>}*/export function addLinkToCalendarEntry(- state: Object, id: string, link: string) {+ state: Object, id: string, link: string): Promise<any> {return new Promise((resolve, reject) => {getShareInfoText(state, link, true).then(shareInfoText => {RNCalendarEvents.findEventById(id).then(event => {@@ -76,9 +77,9 @@ export function isCalendarEnabled() {* @returns {void}*/export function _fetchCalendarEntries(- store,- maybePromptForPermission,- forcePermission) {+ store: Store<*, *>,+ maybePromptForPermission: boolean,+ forcePermission: ?boolean) {const { dispatch, getState } = store;const promptForPermission= (maybePromptForPermissiondiff --git a/react/features/calendar-sync/functions.web.js b/react/features/calendar-sync/functions.web.jsindex 1abd7d145d..1ffb208c31 100644--- a/react/features/calendar-sync/functions.web.js+++ b/react/features/calendar-sync/functions.web.js@@ -47,9 +47,9 @@ export function isCalendarEnabled() {* @returns {void}*/export function _fetchCalendarEntries(- store,- maybePromptForPermission,- forcePermission) {+ store: Object,+ maybePromptForPermission: boolean,+ forcePermission: ?boolean) {/* eslint-enable no-unused-vars */const { dispatch, getState } = store;diff --git a/react/features/calendar-sync/web/googleCalendar.js b/react/features/calendar-sync/web/googleCalendar.jsindex ee6d23f422..11074e2c8b 100644--- a/react/features/calendar-sync/web/googleCalendar.js+++ b/react/features/calendar-sync/web/googleCalendar.js@@ -1,4 +1,6 @@-/* @flow */+// @flow++import type { Dispatch } from 'redux';import {getCalendarEntries,@@ -29,7 +31,7 @@ export const googleCalendarApi = {/*** Returns the email address for the currently logged in user.*- * @returns {function(Dispatch<*>): Promise<string|never>}+ * @returns {function(Dispatch<any>): Promise<string|never>}*/getCurrentEmail() {return updateProfile();@@ -38,10 +40,10 @@ export const googleCalendarApi = {/*** Initializes the google api if needed.*- * @returns {function(Dispatch<*>, Function): Promise<void>}+ * @returns {function(Dispatch<any>, Function): Promise<void>}*/load() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { googleApiApplicationClientID }= getState()['features/base/config'];@@ -52,7 +54,7 @@ export const googleCalendarApi = {/*** Prompts the participant to sign in to the Google API Client Library.*- * @returns {function(Dispatch<*>): Promise<string|never>}+ * @returns {function(Dispatch<any>): Promise<string|never>}*/signIn,@@ -72,7 +74,7 @@ export const googleCalendarApi = {* @param {string} id - The event id.* @param {string} calendarId - The id of the calendar to use.* @param {string} location - The location to save to the event.- * @returns {function(Dispatch<*>): Promise<string|never>}+ * @returns {function(Dispatch<any>): Promise<string|never>}*/updateCalendarEvent};diff --git a/react/features/calendar-sync/web/microsoftCalendar.js b/react/features/calendar-sync/web/microsoftCalendar.jsindex 0d34fc297a..167cb09f78 100644--- a/react/features/calendar-sync/web/microsoftCalendar.js+++ b/react/features/calendar-sync/web/microsoftCalendar.js@@ -1,7 +1,8 @@-/* @flow */+// @flowimport { Client } from '@microsoft/microsoft-graph-client';import rs from 'jsrsasign';+import type { Dispatch } from 'redux';import { createDeferred } from '../../../../modules/util/helpers';@@ -77,10 +78,10 @@ export const microsoftCalendarApi = {* @param {number} fetchStartDays - The number of days to go back* when fetching.* @param {number} fetchEndDays - The number of days to fetch.- * @returns {function(Dispatch<*>, Function): Promise<CalendarEntries>}+ * @returns {function(Dispatch<any>, Function): Promise<CalendarEntries>}*/getCalendarEntries(fetchStartDays: ?number, fetchEndDays: ?number) {- return (dispatch: Dispatch<*>, getState: Function): Promise<*> => {+ return (dispatch: Dispatch<any>, getState: Function): Promise<*> => {const state = getState()['features/calendar-sync'] || {};const token = state.msAuthState && state.msAuthState.accessToken;@@ -118,7 +119,7 @@ export const microsoftCalendarApi = {* @returns {function(Dispatch<*, Function>): Promise<string>}*/getCurrentEmail(): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { msAuthState = {} }= getState()['features/calendar-sync'] || {};const email = msAuthState.userSigninName || '';@@ -139,10 +140,10 @@ export const microsoftCalendarApi = {/*** Prompts the participant to sign in to the Microsoft API Client Library.*- * @returns {function(Dispatch<*>, Function): Promise<void>}+ * @returns {function(Dispatch<any>, Function): Promise<void>}*/signIn(): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {// Ensure only one popup window at a time.if (popupAuthWindow) {popupAuthWindow.focus();@@ -238,10 +239,10 @@ export const microsoftCalendarApi = {/*** Returns whether or not the user is currently signed in.*- * @returns {function(Dispatch<*>, Function): Promise<boolean>}+ * @returns {function(Dispatch<any>, Function): Promise<boolean>}*/_isSignedIn(): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const now = new Date().getTime();const state= getState()['features/calendar-sync'].msAuthState || {};@@ -250,7 +251,7 @@ export const microsoftCalendarApi = {if (state.accessToken && isExpired) {// token expired, let's refresh it- return dispatch(this._refreshAuthToken())+ return dispatch(refreshAuthToken()).then(() => true).catch(() => false);}@@ -259,58 +260,6 @@ export const microsoftCalendarApi = {};},- /**- * Renews an existing auth token so it can continue to be used.- *- * @private- * @returns {function(Dispatch<*>, Function): Promise<void>}- */- _refreshAuthToken(): Function {- return (dispatch: Dispatch<*>, getState: Function) => {- const { microsoftApiApplicationClientID }- = getState()['features/base/config'];- const { msAuthState = {} }- = getState()['features/calendar-sync'] || {};-- const refreshAuthUrl = getAuthRefreshUrl(- microsoftApiApplicationClientID,- msAuthState.userDomainType,- msAuthState.userSigninName);-- const iframe = document.createElement('iframe');-- iframe.setAttribute('id', 'auth-iframe');- iframe.setAttribute('name', 'auth-iframe');- iframe.setAttribute('style', 'display: none');- iframe.setAttribute('src', refreshAuthUrl);-- const signInPromise = new Promise(resolve => {- iframe.onload = () => {- resolve(iframe.contentWindow.location.hash);- };- });-- // The check for body existence is done for flow, which also runs- // against native where document.body may not be defined.- if (!document.body) {- return Promise.reject(- 'Cannot refresh auth token in this environment');- }-- document.body.appendChild(iframe);-- return signInPromise.then(hash => {- const params = getParamsFromHash(hash);-- dispatch(setCalendarAPIAuthState({- accessToken: params.access_token,- idToken: params.id_token,- tokenExpires: params.tokenExpires- }));- });- };- },-/*** Updates calendar event by generating new invite URL and editing the event* adding some descriptive text and location.@@ -318,10 +267,10 @@ export const microsoftCalendarApi = {* @param {string} id - The event id.* @param {string} calendarId - The id of the calendar to use.* @param {string} location - The location to save to the event.- * @returns {function(Dispatch<*>): Promise<string|never>}+ * @returns {function(Dispatch<any>): Promise<string|never>}*/updateCalendarEvent(id: string, calendarId: string, location: string) {- return (dispatch: Dispatch<*>, getState: Function): Promise<*> => {+ return (dispatch: Dispatch<any>, getState: Function): Promise<*> => {const state = getState()['features/calendar-sync'] || {};const token = state.msAuthState && state.msAuthState.accessToken;@@ -533,6 +482,58 @@ function getValidatedTokenParts(tokenInfo, guids, appId) {};}+/**+ * Renews an existing auth token so it can continue to be used.+ *+ * @private+ * @returns {function(Dispatch<any>, Function): Promise<void>}+ */+function refreshAuthToken(): Function {+ return (dispatch: Dispatch<any>, getState: Function) => {+ const { microsoftApiApplicationClientID }+ = getState()['features/base/config'];+ const { msAuthState = {} }+ = getState()['features/calendar-sync'] || {};++ const refreshAuthUrl = getAuthRefreshUrl(+ microsoftApiApplicationClientID,+ msAuthState.userDomainType,+ msAuthState.userSigninName);++ const iframe = document.createElement('iframe');++ iframe.setAttribute('id', 'auth-iframe');+ iframe.setAttribute('name', 'auth-iframe');+ iframe.setAttribute('style', 'display: none');+ iframe.setAttribute('src', refreshAuthUrl);++ const signInPromise = new Promise(resolve => {+ iframe.onload = () => {+ resolve(iframe.contentWindow.location.hash);+ };+ });++ // The check for body existence is done for flow, which also runs+ // against native where document.body may not be defined.+ if (!document.body) {+ return Promise.reject(+ 'Cannot refresh auth token in this environment');+ }++ document.body.appendChild(iframe);++ return signInPromise.then(hash => {+ const params = getParamsFromHash(hash);++ dispatch(setCalendarAPIAuthState({+ accessToken: params.access_token,+ idToken: params.id_token,+ tokenExpires: params.tokenExpires+ }));+ });+ };+}+/*** Retrieves calendar entries from a specific calendar.*diff --git a/react/features/chat/components/AbstractChat.js b/react/features/chat/components/AbstractChat.jsindex bdcd5c8450..f786b46663 100644--- a/react/features/chat/components/AbstractChat.js+++ b/react/features/chat/components/AbstractChat.js@@ -1,6 +1,7 @@// @flowimport { Component } from 'react';+import type { Dispatch } from 'redux';import { getLocalParticipant } from '../../base/participants';@@ -41,7 +42,7 @@ export type Props = {/*** The Redux dispatch function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Function to be used to translate i18n labels.@@ -64,7 +65,7 @@ export default class AbstractChat<P: Props> extends Component<P> {}* }}* @private*/-export function _mapDispatchToProps(dispatch: Dispatch<*>) {+export function _mapDispatchToProps(dispatch: Dispatch<any>) {return {/*** Toggles the chat window.diff --git a/react/features/chat/components/native/ChatButton.js b/react/features/chat/components/native/ChatButton.jsindex 38c3e9058a..7e82293ab2 100644--- a/react/features/chat/components/native/ChatButton.js+++ b/react/features/chat/components/native/ChatButton.js@@ -126,4 +126,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps, _mapDispatchToProps)(ChatButton);diff --git a/react/features/chat/components/web/ChatCounter.js b/react/features/chat/components/web/ChatCounter.jsindex a267373dc4..08598f5f6e 100644--- a/react/features/chat/components/web/ChatCounter.js+++ b/react/features/chat/components/web/ChatCounter.js@@ -57,4 +57,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(ChatCounter);diff --git a/react/features/chat/components/web/ChatInput.js b/react/features/chat/components/web/ChatInput.jsindex e6244cb2ff..ba4a26ccd8 100644--- a/react/features/chat/components/web/ChatInput.js+++ b/react/features/chat/components/web/ChatInput.js@@ -3,6 +3,7 @@import React, { Component } from 'react';import { connect } from 'react-redux';import Emoji from 'react-emoji-render';+import type { Dispatch } from 'redux';import { sendMessage } from '../../actions';@@ -16,7 +17,7 @@ type Props = {/*** Invoked to send chat messages.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Optional callback to get a reference to the chat input element.@@ -231,4 +232,5 @@ class ChatInput extends Component<Props, State> {}}+// $FlowExpectedErrorexport default connect()(ChatInput);diff --git a/react/features/chat/components/web/DisplayNameForm.js b/react/features/chat/components/web/DisplayNameForm.jsindex 05824d3a01..22e9b2e60f 100644--- a/react/features/chat/components/web/DisplayNameForm.js+++ b/react/features/chat/components/web/DisplayNameForm.js@@ -3,6 +3,7 @@import { FieldTextStateless } from '@atlaskit/field-text';import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { translate } from '../../../base/i18n';import { updateSettings } from '../../../base/settings';@@ -15,7 +16,7 @@ type Props = {/*** Invoked to set the local participant display name.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Invoked to obtain translated strings.diff --git a/react/features/conference/components/native/DisplayNameLabel.js b/react/features/conference/components/native/DisplayNameLabel.jsindex 939a337ce8..0107ce9947 100644--- a/react/features/conference/components/native/DisplayNameLabel.js+++ b/react/features/conference/components/native/DisplayNameLabel.js@@ -76,4 +76,5 @@ function _mapStateToProps(state: Object) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(DisplayNameLabel);diff --git a/react/features/conference/components/native/Labels.js b/react/features/conference/components/native/Labels.jsindex 2b39cec8eb..11f1b0df5a 100644--- a/react/features/conference/components/native/Labels.js+++ b/react/features/conference/components/native/Labels.js@@ -367,4 +367,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(makeAspectRatioAware(Labels));diff --git a/react/features/conference/components/native/NavigationBar.js b/react/features/conference/components/native/NavigationBar.jsindex 4fd54328c3..08bf9ba146 100644--- a/react/features/conference/components/native/NavigationBar.js+++ b/react/features/conference/components/native/NavigationBar.js@@ -93,4 +93,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(NavigationBar);diff --git a/react/features/conference/components/web/Conference.js b/react/features/conference/components/web/Conference.jsindex c938f1daff..bc54ecb65b 100644--- a/react/features/conference/components/web/Conference.js+++ b/react/features/conference/components/web/Conference.js@@ -308,4 +308,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default reactReduxConnect(_mapStateToProps)(translate(Conference));diff --git a/react/features/conference/components/web/Labels.js b/react/features/conference/components/web/Labels.jsindex 5f0f436c9f..ddc77f2cde 100644--- a/react/features/conference/components/web/Labels.js+++ b/react/features/conference/components/web/Labels.js@@ -38,7 +38,7 @@ class Labels extends AbstractLabels<Props, State> {** @inheritdoc*/- static getDerivedStateFromProps(props, prevState) {+ static getDerivedStateFromProps(props: Props, prevState: State) {return {filmstripBecomingVisible: !prevState.filmstripBecomingVisible&& props._filmstripVisible@@ -105,4 +105,5 @@ class Labels extends AbstractLabels<Props, State> {_renderVideoQualityLabel: () => React$Element<*>;}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(Labels);diff --git a/react/features/conference/components/web/Subject.js b/react/features/conference/components/web/Subject.jsindex 1239a2d8d3..e01e6b73d1 100644--- a/react/features/conference/components/web/Subject.js+++ b/react/features/conference/components/web/Subject.js@@ -64,4 +64,6 @@ function _mapStateToProps(state) {_visible: isToolboxVisible(state)};}++// $FlowExpectedErrorexport default connect(_mapStateToProps)(Subject);diff --git a/react/features/deep-linking/actions.js b/react/features/deep-linking/actions.jsindex 005690b387..5dc4c0fa4c 100644--- a/react/features/deep-linking/actions.js+++ b/react/features/deep-linking/actions.js@@ -1,4 +1,6 @@-/* @flow */+// @flow++import type { Dispatch } from 'redux';import { appNavigate } from '../app';@@ -10,7 +12,7 @@ import { OPEN_DESKTOP_APP, OPEN_WEB_APP } from './actionTypes';* @returns {Function}*/export function openWebApp() {- return (dispatch: Dispatch<*>) => {+ return (dispatch: Dispatch<any>) => {// In order to go to the web app we need to skip the deep linking// interceptor. OPEN_WEB_APP action should set launchInWeb to true in// the redux store. After this when appNavigate() is called thediff --git a/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js b/react/features/deep-linking/components/DeepLinkingDesktopPage.web.jsindex 3e79fc339f..45800dd48a 100644--- a/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js+++ b/react/features/deep-linking/components/DeepLinkingDesktopPage.web.js@@ -1,9 +1,10 @@-/* @flow */+// @flowimport Button, { ButtonGroup } from '@atlaskit/button';import { AtlasKitThemeProvider } from '@atlaskit/theme';import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { createDeepLinkingPageEvent, sendAnalytics } from '../../analytics';import { translate } from '../../base/i18n';@@ -25,7 +26,7 @@ declare var interfaceConfig: Object;/*** Used to dispatch actions from the buttons.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Used to obtain translations.diff --git a/react/features/desktop-picker/components/DesktopPicker.js b/react/features/desktop-picker/components/DesktopPicker.jsindex 2b7f051f30..bd522c41cb 100644--- a/react/features/desktop-picker/components/DesktopPicker.js+++ b/react/features/desktop-picker/components/DesktopPicker.js@@ -3,6 +3,7 @@import Tabs from '@atlaskit/tabs';import React, { PureComponent } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { Dialog, hideDialog } from '../../base/dialog';import { translate } from '../../base/i18n';@@ -54,7 +55,7 @@ type Props = {/*** Used to request DesktopCapturerSources.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The callback to be invoked when the component is closed or when adiff --git a/react/features/display-name/components/AbstractDisplayNamePrompt.js b/react/features/display-name/components/AbstractDisplayNamePrompt.jsindex 49f68a4d0b..2dd7023847 100644--- a/react/features/display-name/components/AbstractDisplayNamePrompt.js+++ b/react/features/display-name/components/AbstractDisplayNamePrompt.js@@ -1,6 +1,7 @@// @flowimport { Component } from 'react';+import type { Dispatch } from 'redux';import { updateSettings } from '../../base/settings';@@ -13,7 +14,7 @@ export type Props = {/*** Invoked to update the local participant's display name.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Function to be invoked after a successful display name change.diff --git a/react/features/display-name/components/DisplayName.web.js b/react/features/display-name/components/DisplayName.web.jsindex 6ad6189a00..bf2d2bc03a 100644--- a/react/features/display-name/components/DisplayName.web.js+++ b/react/features/display-name/components/DisplayName.web.js@@ -2,6 +2,7 @@import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { appendSuffix } from '../functions';@@ -29,7 +30,7 @@ type Props = {/*** Invoked to update the participant's display name.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** A string to append to the displayName, if provided.diff --git a/react/features/display-name/components/DisplayNamePrompt.native.js b/react/features/display-name/components/DisplayNamePrompt.native.jsindex 2f514529af..86a3fc3236 100644--- a/react/features/display-name/components/DisplayNamePrompt.native.js+++ b/react/features/display-name/components/DisplayNamePrompt.native.js@@ -27,4 +27,5 @@ class DisplayNamePrompt extends AbstractDisplayNamePrompt<*> {_onSetDisplayName: string => boolean;}+// $FlowExpectedErrorexport default connect()(DisplayNamePrompt);diff --git a/react/features/feedback/actions.js b/react/features/feedback/actions.jsindex 57c3881be0..417bf42b39 100644--- a/react/features/feedback/actions.js+++ b/react/features/feedback/actions.js@@ -1,5 +1,7 @@// @flow+import type { Dispatch } from 'redux';+import { openDialog } from '../base/dialog';import { FEEDBACK_REQUEST_IN_PROGRESS } from '../../../modules/UI/UIErrors';@@ -46,7 +48,7 @@ export function maybeOpenFeedbackDialog(conference: Object) {showThankYou: boolean};- return (dispatch: Dispatch<*>, getState: Function): Promise<R> => {+ return (dispatch: Dispatch<any>, getState: Function): Promise<R> => {const state = getState();if (interfaceConfig.filmStripOnly || config.iAmRecorder) {diff --git a/react/features/feedback/components/FeedbackDialog.web.js b/react/features/feedback/components/FeedbackDialog.web.jsindex 2138c01db9..7fff80cbf2 100644--- a/react/features/feedback/components/FeedbackDialog.web.js+++ b/react/features/feedback/components/FeedbackDialog.web.js@@ -1,10 +1,11 @@-/* @flow */+// @flowimport { FieldTextAreaStateless } from '@atlaskit/field-text-area';import StarIcon from '@atlaskit/icon/glyph/star';import StarFilledIcon from '@atlaskit/icon/glyph/star-filled';import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import {createFeedbackOpenEvent,@@ -62,7 +63,7 @@ type Props = {/*** Invoked to signal feedback submission or canceling.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Callback invoked when {@code FeedbackDialog} is unmounted.diff --git a/react/features/filmstrip/components/native/Filmstrip.js b/react/features/filmstrip/components/native/Filmstrip.jsindex 0061a226ab..732a8bc747 100644--- a/react/features/filmstrip/components/native/Filmstrip.js+++ b/react/features/filmstrip/components/native/Filmstrip.js@@ -219,4 +219,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(makeAspectRatioAware(Filmstrip));diff --git a/react/features/filmstrip/components/native/LocalThumbnail.js b/react/features/filmstrip/components/native/LocalThumbnail.jsindex 17ca76680d..bb2fc34e60 100644--- a/react/features/filmstrip/components/native/LocalThumbnail.js+++ b/react/features/filmstrip/components/native/LocalThumbnail.js@@ -60,4 +60,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(LocalThumbnail);diff --git a/react/features/filmstrip/components/native/Thumbnail.js b/react/features/filmstrip/components/native/Thumbnail.jsindex 7972ca398d..848f40570b 100644--- a/react/features/filmstrip/components/native/Thumbnail.js+++ b/react/features/filmstrip/components/native/Thumbnail.js@@ -2,6 +2,7 @@import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { ColorSchemeRegistry } from '../../../base/color-scheme';import { openDialog } from '../../../base/dialog';@@ -81,7 +82,7 @@ type Props = {/*** Invoked to trigger state changes in Redux.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The Redux representation of the participant to display.@@ -254,4 +255,5 @@ function _mapStateToProps(state, ownProps) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps, _mapDispatchToProps)(Thumbnail);diff --git a/react/features/filmstrip/components/native/TileView.js b/react/features/filmstrip/components/native/TileView.jsindex e1024fd0b8..936d6b01bc 100644--- a/react/features/filmstrip/components/native/TileView.js+++ b/react/features/filmstrip/components/native/TileView.js@@ -7,6 +7,7 @@ import {View} from 'react-native';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import {getNearestReceiverVideoQualityLevel,@@ -34,7 +35,7 @@ type Props = {/*** Invoked to update the receiver video quality.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Callback to invoke when tile view is tapped.@@ -334,4 +335,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(makeAspectRatioAware(TileView));diff --git a/react/features/filmstrip/components/web/Filmstrip.js b/react/features/filmstrip/components/web/Filmstrip.jsindex 798fcb8c6f..1b47c6cd53 100644--- a/react/features/filmstrip/components/web/Filmstrip.js+++ b/react/features/filmstrip/components/web/Filmstrip.js@@ -3,6 +3,7 @@import _ from 'lodash';import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import {createShortcutEvent,@@ -53,7 +54,7 @@ type Props = {/*** The redux {@code dispatch} function.*/- dispatch: Dispatch<*>+ dispatch: Dispatch<any>};/**@@ -318,4 +319,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(Filmstrip);diff --git a/react/features/filmstrip/components/web/Toolbar.js b/react/features/filmstrip/components/web/Toolbar.jsindex edeba3ca8a..6a9aec0557 100644--- a/react/features/filmstrip/components/web/Toolbar.js+++ b/react/features/filmstrip/components/web/Toolbar.js@@ -90,4 +90,5 @@ function _mapStateToProps(state): Object { // eslint-disable-line no-unused-vars};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(Toolbar);diff --git a/react/features/google-api/actions.js b/react/features/google-api/actions.jsindex 0447587fcd..4689754115 100644--- a/react/features/google-api/actions.js+++ b/react/features/google-api/actions.js@@ -1,4 +1,7 @@-/* @flow */+// @flow++import type { Dispatch } from 'redux';+import { getShareInfoText } from '../invite';import {@@ -13,7 +16,7 @@ import googleApi from './googleApi';** @param {number} fetchStartDays - The number of days to go back when fetching.* @param {number} fetchEndDays - The number of days to fetch.- * @returns {function(Dispatch<*>): Promise<CalendarEntries>}+ * @returns {function(Dispatch<any>): Promise<CalendarEntries>}*/export function getCalendarEntries(fetchStartDays: ?number, fetchEndDays: ?number) {@@ -30,7 +33,7 @@ export function getCalendarEntries(* @returns {Function}*/export function loadGoogleAPI(clientId: string) {- return (dispatch: Dispatch<*>, getState: Function) =>+ return (dispatch: Dispatch<any>, getState: Function) =>googleApi.get().then(() => {if (getState()['features/google-api'].googleAPIState@@ -146,10 +149,10 @@ export function showAccountSelection() {/*** Prompts the participant to sign in to the Google API Client Library.*- * @returns {function(Dispatch<*>): Promise<string | never>}+ * @returns {function(Dispatch<any>): Promise<string | never>}*/export function signIn() {- return (dispatch: Dispatch<*>) => googleApi.get()+ return (dispatch: Dispatch<any>) => googleApi.get().then(() => googleApi.signInIfNotSignedIn()).then(() => dispatch({type: SET_GOOGLE_API_STATE,@@ -160,10 +163,10 @@ export function signIn() {/*** Logs out the user.*- * @returns {function(Dispatch<*>): Promise<string | never>}+ * @returns {function(Dispatch<any>): Promise<string | never>}*/export function signOut() {- return (dispatch: Dispatch<*>) =>+ return (dispatch: Dispatch<any>) =>googleApi.get().then(() => googleApi.signOut()).then(() => {@@ -181,10 +184,10 @@ export function signOut() {/*** Updates the profile data that is currently used.*- * @returns {function(Dispatch<*>): Promise<string | never>}+ * @returns {function(Dispatch<any>): Promise<string | never>}*/export function updateProfile() {- return (dispatch: Dispatch<*>) => googleApi.get()+ return (dispatch: Dispatch<any>) => googleApi.get().then(() => googleApi.signInIfNotSignedIn()).then(() => dispatch({type: SET_GOOGLE_API_STATE,@@ -207,11 +210,11 @@ export function updateProfile() {* @param {string} id - The event id to update.* @param {string} calendarId - The calendar id to use.* @param {string} location - The location to add to the event.- * @returns {function(Dispatch<*>): Promise<string | never>}+ * @returns {function(Dispatch<any>): Promise<string | never>}*/export function updateCalendarEvent(id: string, calendarId: string, location: string) {- return (dispatch: Dispatch<*>, getState: Function) =>+ return (dispatch: Dispatch<any>, getState: Function) =>getShareInfoText(getState(), location).then(text =>googleApi._updateCalendarEntry(id, calendarId, location, text));diff --git a/react/features/invite/actions.js b/react/features/invite/actions.jsindex f167cc54cb..9361645a66 100644--- a/react/features/invite/actions.js+++ b/react/features/invite/actions.js@@ -1,5 +1,7 @@// @flow+import type { Dispatch } from 'redux';+import { getInviteURL } from '../base/connection';import { inviteVideoRooms } from '../videosipgw';import { getParticipants } from '../base/participants';@@ -51,7 +53,7 @@ export function invite(invitees: Array<Object>,showCalleeInfo: boolean = false) {return (- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,getState: Function): Promise<Array<Object>> => {const state = getState();const participants = getParticipants(state);@@ -161,7 +163,7 @@ export function invite(* @returns {Function}*/export function updateDialInNumbers() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const state = getState();const { dialInConfCodeUrl, dialInNumbersUrl, hosts }= state['features/base/config'];diff --git a/react/features/invite/components/InfoDialogButton.web.js b/react/features/invite/components/InfoDialogButton.web.jsindex f3380bda2f..37bb60f44c 100644--- a/react/features/invite/components/InfoDialogButton.web.js+++ b/react/features/invite/components/InfoDialogButton.web.js@@ -3,6 +3,7 @@import InlineDialog from '@atlaskit/inline-dialog';import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { createToolbarEvent, sendAnalytics } from '../../analytics';import { openDialog } from '../../base/dialog';@@ -58,7 +59,7 @@ type Props = {/*** Invoked to toggle display of the info dialog.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Whether to show the label or not.diff --git a/react/features/invite/components/InviteButton.native.js b/react/features/invite/components/InviteButton.native.jsindex 5818b9565e..6ab4007b35 100644--- a/react/features/invite/components/InviteButton.native.js+++ b/react/features/invite/components/InviteButton.native.js@@ -71,7 +71,7 @@ class InviteButton extends AbstractButton<Props, *> {* }}* @private*/-function _mapDispatchToProps(dispatch: Dispatch<*>) {+function _mapDispatchToProps(dispatch: Dispatch<any>) {return {/**diff --git a/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.js b/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.jsindex 7abc29e311..84869eae4f 100644--- a/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.js+++ b/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.js@@ -158,7 +158,7 @@ export default class AbstractAddPeopleDialog<P: Props, S: State>|| this.state.addToCallInProgress;}- _query: (string) => Promise<Array<Object>>;+ _query: (?string) => Promise<Array<Object>>;/*** Performs a people and phone number search request.diff --git a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.jsindex 002bfc6d02..12344836c8 100644--- a/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js+++ b/react/features/invite/components/add-people-dialog/native/AddPeopleDialog.js@@ -268,9 +268,11 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {});} else {// Item is not selected yet, need to add to the list.+ const items: Array<*> = inviteItems.concat(item);+this.setState({- inviteItems: _.orderBy(- inviteItems.concat(item), [ 'name' ], [ 'asc' ])+ // $FlowExpectedError+ inviteItems: _.orderBy(items, [ 'name' ], [ 'asc' ])});}};@@ -320,10 +322,10 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {}});- selectableItems- = _.orderBy(- this.state.inviteItems.concat(selectableItems),- [ 'name' ], [ 'asc' ]);+ const items = this.state.inviteItems.concat(selectableItems);++ // $FlowExpectedError+ selectableItems = _.orderBy(items, [ 'name' ], [ 'asc' ]);this.setState({selectableItems@@ -402,7 +404,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {);}- _renderSeparator: () => ?React$Element<*>+ _renderSeparator: () => React$Element<*> | null/*** Renders the item separator.diff --git a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.jsindex 912d85d6df..9ceecb21c8 100644--- a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js+++ b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js@@ -4,6 +4,7 @@ import Avatar from '@atlaskit/avatar';import InlineMessage from '@atlaskit/inline-message';import React from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { createInviteDialogEvent, sendAnalytics } from '../../../../analytics';import { Dialog, hideDialog } from '../../../../base/dialog';@@ -38,7 +39,7 @@ type Props = AbstractProps & {/*** The redux {@code dispatch} function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Invoked to obtain translated strings.@@ -267,7 +268,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {});}- _parseQueryResults: (Array<Object>, string) => Array<Object>;+ _parseQueryResults: (?Array<Object>) => Array<Object>;/*** Processes results from requesting available numbers and people by mungingdiff --git a/react/features/invite/components/callee-info/CalleeInfo.js b/react/features/invite/components/callee-info/CalleeInfo.jsindex 49746ae6ef..b274b026aa 100644--- a/react/features/invite/components/callee-info/CalleeInfo.js+++ b/react/features/invite/components/callee-info/CalleeInfo.js@@ -158,4 +158,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(CalleeInfo);diff --git a/react/features/invite/components/callee-info/CalleeInfoContainer.js b/react/features/invite/components/callee-info/CalleeInfoContainer.jsindex dfbac4f839..ed095262a9 100644--- a/react/features/invite/components/callee-info/CalleeInfoContainer.js+++ b/react/features/invite/components/callee-info/CalleeInfoContainer.js@@ -61,4 +61,5 @@ function _mapStateToProps(state: Object): Object {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(CalleeInfoContainer);diff --git a/react/features/invite/components/info-dialog/InfoDialog.web.js b/react/features/invite/components/info-dialog/InfoDialog.web.jsindex ba997c72da..4209d1d3ec 100644--- a/react/features/invite/components/info-dialog/InfoDialog.web.js+++ b/react/features/invite/components/info-dialog/InfoDialog.web.js@@ -2,6 +2,7 @@import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { setPassword } from '../../../base/conference';import { getInviteURL } from '../../../base/connection';@@ -65,7 +66,7 @@ type Props = {/*** Invoked to open a dialog for adding participants to the conference.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Whether is Atlaskit InlineDialog or a normal dialog.diff --git a/react/features/large-video/actions.js b/react/features/large-video/actions.jsindex c07c4bd1fb..bfa5fee673 100644--- a/react/features/large-video/actions.js+++ b/react/features/large-video/actions.js@@ -1,5 +1,7 @@// @flow+import type { Dispatch } from 'redux';+import {createSelectParticipantFailedEvent,sendAnalytics@@ -23,7 +25,7 @@ declare var APP: Object;* @returns {Function}*/export function selectParticipant() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const state = getState();const { conference } = state['features/base/conference'];@@ -54,7 +56,7 @@ export function selectParticipant() {* @returns {Function}*/export function selectParticipantInLargeVideo() {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const state = getState();const participantId = _electParticipantInLargeVideo(state);const largeVideo = state['features/large-video'];diff --git a/react/features/large-video/components/LargeVideo.native.js b/react/features/large-video/components/LargeVideo.native.jsindex 17f409c17d..e8fa570320 100644--- a/react/features/large-video/components/LargeVideo.native.js+++ b/react/features/large-video/components/LargeVideo.native.js@@ -72,7 +72,7 @@ class LargeVideo extends Component<Props, State> {* @param {Object} props - The read-only properties with which the new* instance is to be initialized.*/- constructor(props) {+ constructor(props: Props) {super(props);// Bind event handlers so they are only bound once per instance.@@ -159,4 +159,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(LargeVideo);diff --git a/react/features/local-recording/components/LocalRecordingInfoDialog.js b/react/features/local-recording/components/LocalRecordingInfoDialog.jsindex 47813f9162..86054d51a7 100644--- a/react/features/local-recording/components/LocalRecordingInfoDialog.js+++ b/react/features/local-recording/components/LocalRecordingInfoDialog.js@@ -1,8 +1,9 @@-/* @flow */+// @flowimport moment from 'moment';import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { Dialog } from '../../base/dialog';import { translate } from '../../base/i18n';@@ -24,7 +25,7 @@ type Props = {/*** Redux store dispatch function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Current encoding format.diff --git a/react/features/local-recording/recording/flac/flacEncodeWorker.js b/react/features/local-recording/recording/flac/flacEncodeWorker.jsindex def7c4cdc3..ab9508f9da 100644--- a/react/features/local-recording/recording/flac/flacEncodeWorker.js+++ b/react/features/local-recording/recording/flac/flacEncodeWorker.js@@ -69,17 +69,17 @@ const EncoderState = Object.freeze({/*** Initial state, when libflac.js is not initialized.*/- UNINTIALIZED: Symbol('uninitialized'),+ UNINTIALIZED: 'uninitialized',/*** Actively encoding new audio bits.*/- WORKING: Symbol('working'),+ WORKING: 'working',/*** Encoding has finished and encoded bits are available.*/- FINISHED: Symbol('finished')+ FINISHED: 'finished'});/**diff --git a/react/features/mobile/background/actions.js b/react/features/mobile/background/actions.jsindex ecaee774eb..26cb2cd16b 100644--- a/react/features/mobile/background/actions.js+++ b/react/features/mobile/background/actions.js@@ -1,4 +1,6 @@-/* @flow */+// @flow++import type { Dispatch } from 'redux';import {createTrackMutedEvent,@@ -37,7 +39,7 @@ export function _setAppStateListener(listener: ?Function) {* @returns {Function}*/export function _setBackgroundVideoMuted(muted: boolean) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {// Disable remote video when we mute by setting lastN to 0. Skip it if// the conference is in audio-only mode, as it's already configured to// have no video. Leave it as undefined when unmuting, the default valuediff --git a/react/features/mobile/background/middleware.js b/react/features/mobile/background/middleware.jsindex 8d2328668e..5074d8b8e3 100644--- a/react/features/mobile/background/middleware.js+++ b/react/features/mobile/background/middleware.js@@ -91,7 +91,7 @@ function _appStateChanged(dispatch: Function, appState: string) {* @private* @returns {void}*/-function _onAppStateChange(dispatch: Dispatch<*>, appState: string) {+function _onAppStateChange(dispatch: Dispatch<any>, appState: string) {dispatch(appStateChanged(appState));}diff --git a/react/features/mobile/network-activity/components/NetworkActivityIndicator.js b/react/features/mobile/network-activity/components/NetworkActivityIndicator.jsindex ca51b9ffa3..c5cba2bdff 100644--- a/react/features/mobile/network-activity/components/NetworkActivityIndicator.js+++ b/react/features/mobile/network-activity/components/NetworkActivityIndicator.js@@ -1,4 +1,4 @@-/* @flow */+// @flowimport React, { Component } from 'react';import { connect } from 'react-redux';@@ -52,4 +52,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(NetworkActivityIndicator);diff --git a/react/features/mobile/picture-in-picture/actions.js b/react/features/mobile/picture-in-picture/actions.jsindex 4d8ab349a6..83c21a0314 100644--- a/react/features/mobile/picture-in-picture/actions.js+++ b/react/features/mobile/picture-in-picture/actions.js@@ -1,6 +1,7 @@// @flowimport { NativeModules } from 'react-native';+import type { Dispatch } from 'redux';import { getAppProp } from '../../base/app';import { Platform } from '../../base/react';@@ -20,7 +21,7 @@ const logger = require('jitsi-meet-logger').getLogger(__filename);* @returns {Function}*/export function enterPictureInPicture() {- return (dispatch: Dispatch, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {// XXX At the time of this writing this action can only be dispatched by// the button which is on the conference view, which means that it's// fine to enter PiP mode.diff --git a/react/features/notifications/components/NotificationsContainer.web.js b/react/features/notifications/components/NotificationsContainer.web.jsindex c7785866ee..24f4120719 100644--- a/react/features/notifications/components/NotificationsContainer.web.js+++ b/react/features/notifications/components/NotificationsContainer.web.js@@ -63,4 +63,5 @@ class NotificationsContainer extends AbstractNotificationsContainer<Props> {}}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(NotificationsContainer);diff --git a/react/features/overlay/components/AbstractPageReloadOverlay.js b/react/features/overlay/components/AbstractPageReloadOverlay.jsindex 5ac5dc5e6e..6a71f780af 100644--- a/react/features/overlay/components/AbstractPageReloadOverlay.js+++ b/react/features/overlay/components/AbstractPageReloadOverlay.js@@ -2,6 +2,7 @@import { randomInt } from 'js-utils/random';import React, { Component } from 'react';+import type { Dispatch } from 'redux';import {createPageReloadScheduledEvent,@@ -31,7 +32,7 @@ export type Props = {*/details: Object,- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The indicator which determines whether the reload was caused by networkdiff --git a/react/features/overlay/components/FilmstripOnlyOverlayFrame.js b/react/features/overlay/components/FilmstripOnlyOverlayFrame.jsindex 935acbc1af..b1bf5d33d2 100644--- a/react/features/overlay/components/FilmstripOnlyOverlayFrame.js+++ b/react/features/overlay/components/FilmstripOnlyOverlayFrame.js@@ -1,4 +1,4 @@-/* @flow */+// @flowimport React, { Component } from 'react';import { connect } from 'react-redux';@@ -112,4 +112,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(FilmstripOnlyOverlayFrame);diff --git a/react/features/overlay/components/OverlayContainer.js b/react/features/overlay/components/OverlayContainer.jsindex 2e05e362ff..151245352d 100644--- a/react/features/overlay/components/OverlayContainer.js+++ b/react/features/overlay/components/OverlayContainer.js@@ -58,4 +58,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(OverlayContainer);diff --git a/react/features/recent-list/components/AbstractRecentList.js b/react/features/recent-list/components/AbstractRecentList.jsindex fdf9180a44..b8d2e7bd41 100644--- a/react/features/recent-list/components/AbstractRecentList.js+++ b/react/features/recent-list/components/AbstractRecentList.js@@ -1,5 +1,7 @@// @flow+import React from 'react';+import type { Dispatch } from 'redux';import {createRecentClickedEvent,@@ -23,7 +25,7 @@ type Props = {/*** The redux store's {@code dispatch} function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The translate function.diff --git a/react/features/recent-list/components/RecentList.native.js b/react/features/recent-list/components/RecentList.native.jsindex 614cd51a2b..378ffc59db 100644--- a/react/features/recent-list/components/RecentList.native.js+++ b/react/features/recent-list/components/RecentList.native.js@@ -1,6 +1,8 @@// @flow+import React from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { getDefaultURL } from '../../app';import { translate } from '../../base/i18n';@@ -24,7 +26,7 @@ type Props = {/*** The redux store's {@code dispatch} function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The translate function.diff --git a/react/features/recent-list/components/RecentList.web.js b/react/features/recent-list/components/RecentList.web.jsindex c353dd5d4c..a5790d1d1f 100644--- a/react/features/recent-list/components/RecentList.web.js+++ b/react/features/recent-list/components/RecentList.web.js@@ -1,6 +1,8 @@// @flow+import React from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { translate } from '../../base/i18n';import { MeetingsList } from '../../base/react';@@ -21,7 +23,7 @@ type Props = {/*** The redux store's {@code dispatch} function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The translate function.diff --git a/react/features/recording/components/Recording/StartRecordingDialogContent.js b/react/features/recording/components/Recording/StartRecordingDialogContent.jsindex d00ed2c0bd..52d3863b52 100644--- a/react/features/recording/components/Recording/StartRecordingDialogContent.js+++ b/react/features/recording/components/Recording/StartRecordingDialogContent.js@@ -271,8 +271,8 @@ class StartRecordingDialogContent extends Component<Props> {);}- _onDropboxSwitchChange: boolean => void;- _onRecordingServiceSwitchChange: boolean => void;+ _onDropboxSwitchChange: () => void;+ _onRecordingServiceSwitchChange: () => void;/*** Handler for onValueChange events from the Switch component.diff --git a/react/features/remote-video-menu/components/native/RemoteVideoMenu.js b/react/features/remote-video-menu/components/native/RemoteVideoMenu.jsindex dafd6bbe62..3e288eceb7 100644--- a/react/features/remote-video-menu/components/native/RemoteVideoMenu.js+++ b/react/features/remote-video-menu/components/native/RemoteVideoMenu.js@@ -135,4 +135,5 @@ function _mapStateToProps(state, ownProps) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(RemoteVideoMenu);diff --git a/react/features/room-lock/actions.js b/react/features/room-lock/actions.jsindex f6a3a5469b..4e29d304dc 100644--- a/react/features/room-lock/actions.js+++ b/react/features/room-lock/actions.js@@ -1,5 +1,7 @@// @flow+import type { Dispatch } from 'redux';+import { appNavigate } from '../app';import {conferenceLeft,@@ -37,7 +39,7 @@ export function beginRoomLockRequest(conference: ?Object) {* @returns {Function}*/export function _cancelPasswordRequiredPrompt(conference: Object) {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {// Canceling PasswordRequiredPrompt is to navigate the app/user to// WelcomePage. In other words, the canceling invalidates the// locationURL. Make sure that the canceling indeed has the intent to@@ -105,7 +107,7 @@ export function _openPasswordRequiredPrompt(conference: Object) {* @returns {Function}*/export function unlockRoom() {- return (dispatch: Dispatch<Function>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const { conference } = getState()['features/base/conference'];return dispatch(setPassword(diff --git a/react/features/room-lock/components/PasswordRequiredPrompt.native.js b/react/features/room-lock/components/PasswordRequiredPrompt.native.jsindex 5d6253129d..3071ed78e5 100644--- a/react/features/room-lock/components/PasswordRequiredPrompt.native.js+++ b/react/features/room-lock/components/PasswordRequiredPrompt.native.js@@ -2,6 +2,7 @@import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { setPassword } from '../../base/conference';import { InputDialog } from '../../base/dialog';@@ -23,7 +24,7 @@ type Props = {/*** The redux dispatch function.*/- dispatch: Dispatch<*>+ dispatch: Dispatch<any>};/**@@ -99,4 +100,5 @@ class PasswordRequiredPrompt extends Component<Props> {}}+// $FlowExpectedErrorexport default connect()(PasswordRequiredPrompt);diff --git a/react/features/room-lock/components/PasswordRequiredPrompt.web.js b/react/features/room-lock/components/PasswordRequiredPrompt.web.jsindex 21aff4c1c7..cf2403b25b 100644--- a/react/features/room-lock/components/PasswordRequiredPrompt.web.js+++ b/react/features/room-lock/components/PasswordRequiredPrompt.web.js@@ -1,8 +1,9 @@// @flow+import { FieldTextStateless as TextField } from '@atlaskit/field-text';import React, { Component } from 'react';import { connect } from 'react-redux';-import { FieldTextStateless as TextField } from '@atlaskit/field-text';+import type { Dispatch } from 'redux';import { setPassword } from '../../base/conference';import { Dialog } from '../../base/dialog';@@ -22,7 +23,7 @@ type Props = {/*** The redux store's {@code dispatch} function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The translate function.diff --git a/react/features/room-lock/components/RoomLockPrompt.native.js b/react/features/room-lock/components/RoomLockPrompt.native.jsindex f2df9555b8..7a1077643a 100644--- a/react/features/room-lock/components/RoomLockPrompt.native.js+++ b/react/features/room-lock/components/RoomLockPrompt.native.js@@ -2,6 +2,7 @@import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import { InputDialog } from '../../base/dialog';@@ -30,7 +31,7 @@ type Props = {/*** Redux store dispatch function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,};/**@@ -44,7 +45,7 @@ class RoomLockPrompt extends Component<Props> {* @param {Props} props - The read-only properties with which the new* instance is to be initialized.*/- constructor(props) {+ constructor(props: Props) {super(props);// Bind event handlers so they are only bound once per instance.@@ -101,4 +102,5 @@ class RoomLockPrompt extends Component<Props> {}}+// $FlowExpectedErrorexport default connect()(RoomLockPrompt);diff --git a/react/features/settings/components/AbstractSettingsView.js b/react/features/settings/components/AbstractSettingsView.jsindex 3bd0ef4bba..2c81c717c7 100644--- a/react/features/settings/components/AbstractSettingsView.js+++ b/react/features/settings/components/AbstractSettingsView.js@@ -1,6 +1,7 @@// @flowimport { Component } from 'react';+import type { Dispatch } from 'redux';import { getDefaultURL } from '../../app';import { updateSettings } from '../../base/settings';@@ -33,7 +34,7 @@ export type Props = {/*** Redux store dispatch function.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** The i18n translate function.diff --git a/react/features/settings/components/web/SettingsDialog.js b/react/features/settings/components/web/SettingsDialog.jsindex 402159bfa8..dc62435343 100644--- a/react/features/settings/components/web/SettingsDialog.js+++ b/react/features/settings/components/web/SettingsDialog.js@@ -198,4 +198,5 @@ function _mapStateToProps(state) {return { _tabs: tabs };}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(SettingsDialog);diff --git a/react/features/subtitles/components/Captions.native.js b/react/features/subtitles/components/Captions.native.jsindex 230e980ab3..ba157256e9 100644--- a/react/features/subtitles/components/Captions.native.js+++ b/react/features/subtitles/components/Captions.native.js@@ -65,4 +65,5 @@ class Captions}}+// $FlowExpectedErrorexport default connect(_abstractMapStateToProps)(Captions);diff --git a/react/features/subtitles/components/Captions.web.js b/react/features/subtitles/components/Captions.web.jsindex dc37528e74..774d0c6bd6 100644--- a/react/features/subtitles/components/Captions.web.js+++ b/react/features/subtitles/components/Captions.web.js@@ -52,4 +52,5 @@ class Captions}}+// $FlowExpectedErrorexport default connect(_abstractMapStateToProps)(Captions);diff --git a/react/features/toolbox/actions.web.js b/react/features/toolbox/actions.web.jsindex fc1e5fc942..583726b528 100644--- a/react/features/toolbox/actions.web.js+++ b/react/features/toolbox/actions.web.js@@ -1,5 +1,6 @@-/* @flow */+// @flow+import type { Dispatch } from 'redux';import {clearToolboxTimeout,@@ -23,7 +24,7 @@ export * from './actions.native';* @returns {Function}*/export function dockToolbox(dock: boolean): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {if (interfaceConfig.filmStripOnly) {return;}@@ -71,7 +72,7 @@ export function fullScreenChanged(fullScreen: boolean) {* @returns {Function}*/export function hideToolbox(force: boolean = false): Function {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const state = getState();const {alwaysVisible,@@ -122,7 +123,7 @@ export function setFullScreen(fullScreen: boolean) {* @returns {Function}*/export function showToolbox(timeout: number = 0): Object {- return (dispatch: Dispatch<*>, getState: Function) => {+ return (dispatch: Dispatch<any>, getState: Function) => {const state = getState();const {alwaysVisible,diff --git a/react/features/toolbox/components/native/OverflowMenu.js b/react/features/toolbox/components/native/OverflowMenu.jsindex f29e461868..cfb8116006 100644--- a/react/features/toolbox/components/native/OverflowMenu.js+++ b/react/features/toolbox/components/native/OverflowMenu.js@@ -128,6 +128,7 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorOverflowMenu_ = connect(_mapStateToProps)(OverflowMenu);export default OverflowMenu_;diff --git a/react/features/toolbox/components/native/Toolbox.js b/react/features/toolbox/components/native/Toolbox.jsindex 59435b8434..b87ee0183a 100644--- a/react/features/toolbox/components/native/Toolbox.js+++ b/react/features/toolbox/components/native/Toolbox.js@@ -279,4 +279,5 @@ function _mapStateToProps(state: Object): Object {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(Toolbox);diff --git a/react/features/toolbox/components/web/OverflowMenuProfileItem.js b/react/features/toolbox/components/web/OverflowMenuProfileItem.jsindex 93e9b5f927..7a12fd6cf2 100644--- a/react/features/toolbox/components/web/OverflowMenuProfileItem.js+++ b/react/features/toolbox/components/web/OverflowMenuProfileItem.js@@ -1,4 +1,4 @@-/* @flow */+// @flowimport React, { Component } from 'react';import { connect } from 'react-redux';@@ -121,4 +121,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(OverflowMenuProfileItem);diff --git a/react/features/toolbox/middleware.js b/react/features/toolbox/middleware.jsindex 2f38565324..d0c92c0bbd 100644--- a/react/features/toolbox/middleware.js+++ b/react/features/toolbox/middleware.js@@ -43,6 +43,12 @@ MiddlewareRegistry.register(store => next => action => {return next(action);});+type DocumentElement = {+ +requestFullscreen?: Function,+ +mozRequestFullScreen?: Function,+ +webkitRequestFullscreen?: Function+}+/*** Makes an external request to enter or exit full screen mode.*@@ -58,7 +64,8 @@ function _setFullScreen(next, action) {const { fullScreen } = action;if (fullScreen) {- const documentElement = document.documentElement || {};+ const documentElement: DocumentElement+ = document.documentElement || {};if (typeof documentElement.requestFullscreen === 'function') {documentElement.requestFullscreen();diff --git a/react/features/video-layout/components/TileViewButton.js b/react/features/video-layout/components/TileViewButton.jsindex cb0fcfc5a9..31b44dd094 100644--- a/react/features/video-layout/components/TileViewButton.js+++ b/react/features/video-layout/components/TileViewButton.js@@ -1,6 +1,7 @@// @flowimport { connect } from 'react-redux';+import type { Dispatch } from 'redux';import {createToolbarEvent,@@ -27,7 +28,7 @@ type Props = AbstractButtonProps & {/*** Used to dispatch actions from the buttons.*/- dispatch: Dispatch<*>+ dispatch: Dispatch<any>};/**diff --git a/react/features/video-quality/components/VideoQualitySlider.web.js b/react/features/video-quality/components/VideoQualitySlider.web.jsindex c3e1800896..8edc1179af 100644--- a/react/features/video-quality/components/VideoQualitySlider.web.js+++ b/react/features/video-quality/components/VideoQualitySlider.web.js@@ -1,8 +1,9 @@-/* @flow */+// @flowimport InlineMessage from '@atlaskit/inline-message';import React, { Component } from 'react';import { connect } from 'react-redux';+import type { Dispatch } from 'redux';import {createToolbarEvent,@@ -70,7 +71,7 @@ type Props = {/*** Invoked to request toggling of audio only mode.*/- dispatch: Dispatch<*>,+ dispatch: Dispatch<any>,/*** Invoked to obtain translated strings.diff --git a/react/features/welcome/components/AbstractWelcomePage.js b/react/features/welcome/components/AbstractWelcomePage.jsindex 7ceb31a079..e7f40e8e10 100644--- a/react/features/welcome/components/AbstractWelcomePage.js+++ b/react/features/welcome/components/AbstractWelcomePage.js@@ -2,6 +2,7 @@import { generateRoomWithoutSeparator } from 'js-utils/random';import { Component } from 'react';+import type { Dispatch } from 'redux';import { createWelcomePageEvent, sendAnalytics } from '../../analytics';import { appNavigate } from '../../app';@@ -25,7 +26,7 @@ type Props = {/*** The Redux dispatch Function.*/- dispatch: Dispatch<*>+ dispatch: Dispatch<any>};/**diff --git a/react/features/welcome/components/BlankPage.native.js b/react/features/welcome/components/BlankPage.native.jsindex 8a71af59fe..93f157fdd8 100644--- a/react/features/welcome/components/BlankPage.native.js+++ b/react/features/welcome/components/BlankPage.native.js@@ -13,7 +13,7 @@ import LocalVideoTrackUnderlay from './LocalVideoTrackUnderlay';* The type of React {@code Component} props of {@link BlankPage}.*/type Props = {- dispatch: Dispatch<*>+ dispatch: Dispatch<any>};/**@@ -48,4 +48,5 @@ class BlankPage extends Component<Props> {}}+// $FlowExpectedErrorexport default connect()(BlankPage);diff --git a/react/features/welcome/components/LocalVideoTrackUnderlay.native.js b/react/features/welcome/components/LocalVideoTrackUnderlay.native.jsindex 6b96f14370..b7ff110605 100644--- a/react/features/welcome/components/LocalVideoTrackUnderlay.native.js+++ b/react/features/welcome/components/LocalVideoTrackUnderlay.native.js@@ -1,4 +1,4 @@-/* @flow */+// @flowimport React, { Component } from 'react';import { View } from 'react-native';@@ -77,4 +77,5 @@ function _mapStateToProps(state) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(LocalVideoTrackUnderlay);diff --git a/react/features/welcome/components/VideoSwitch.js b/react/features/welcome/components/VideoSwitch.jsindex 8f68623a6c..43824a6735 100644--- a/react/features/welcome/components/VideoSwitch.js+++ b/react/features/welcome/components/VideoSwitch.js@@ -120,9 +120,9 @@ class VideoSwitch extends Component<Props> {return () => this._onStartAudioOnlyChange(startAudioOnly);}- _onStartAudioOnlyFalse: boolean => void;+ _onStartAudioOnlyFalse: () => void;- _onStartAudioOnlyTrue: boolean => void;+ _onStartAudioOnlyTrue: () => void;}/**diff --git a/react/features/welcome/components/WelcomePageSideBar.native.js b/react/features/welcome/components/WelcomePageSideBar.native.jsindex 5bd1ebc557..75ce2676ea 100644--- a/react/features/welcome/components/WelcomePageSideBar.native.js+++ b/react/features/welcome/components/WelcomePageSideBar.native.js@@ -67,7 +67,7 @@ class WelcomePageSideBar extends Component<Props> {** @inheritdoc*/- constructor(props) {+ constructor(props: Props) {super(props);// Bind event handlers so they are only bound once per instance.@@ -169,4 +169,5 @@ function _mapStateToProps(state: Object) {};}+// $FlowExpectedErrorexport default connect(_mapStateToProps)(WelcomePageSideBar);