diff --git a/react/features/base/dialog/components/Dialog.native.js b/react/features/base/dialog/components/Dialog.native.js index 469c90cea7..ee68f082d9 100644 --- a/react/features/base/dialog/components/Dialog.native.js +++ b/react/features/base/dialog/components/Dialog.native.js @@ -173,6 +173,7 @@ class Dialog extends AbstractDialog { if (style && (style = StyleSheet.flatten(style)) && _TAG_KEY in style) { + // $FlowFixMe switch (style[_TAG_KEY]) { case _SUBMIT_TEXT_TAG_VALUE: if (this.state.submitting) { diff --git a/react/features/base/jwt/components/CalleeInfo.js b/react/features/base/jwt/components/CalleeInfo.js index 3fe5ee4962..58cbec4e3b 100644 --- a/react/features/base/jwt/components/CalleeInfo.js +++ b/react/features/base/jwt/components/CalleeInfo.js @@ -75,9 +75,9 @@ class CalleeInfo extends Component { _onLargeVideoAvatarVisible: Function; - _playAudioInterval: ?number; + _playAudioInterval: *; - _ringingTimeout: ?number + _ringingTimeout: *; _setAudio: Function; diff --git a/react/features/base/media/components/native/VideoTransform.js b/react/features/base/media/components/native/VideoTransform.js index 0fdb9510d7..ff814eafe4 100644 --- a/react/features/base/media/components/native/VideoTransform.js +++ b/react/features/base/media/components/native/VideoTransform.js @@ -3,6 +3,7 @@ import React, { Component } from 'react'; import { PanResponder, PixelRatio, View } from 'react-native'; import { connect } from 'react-redux'; +import { type Dispatch } from 'redux'; import { storeVideoTransform } from '../../actions'; import styles from './styles'; @@ -684,7 +685,7 @@ class VideoTransform extends Component { * _onUnmount: Function * }} */ -function _mapDispatchToProps(dispatch) { +function _mapDispatchToProps(dispatch: Dispatch<*>) { return { /** * Dispatches actions to store the last applied transform to a video. @@ -712,7 +713,7 @@ function _mapDispatchToProps(dispatch) { function _mapStateToProps(state) { return { /** - * The stored transforms retreived from Redux to be initially applied to + * The stored transforms retrieved from Redux to be initially applied to * different streams. * * @private diff --git a/react/features/base/react/components/native/Header.js b/react/features/base/react/components/native/Header.js index 98d1c5e712..91797d64f5 100644 --- a/react/features/base/react/components/native/Header.js +++ b/react/features/base/react/components/native/Header.js @@ -1,6 +1,6 @@ // @flow -import React, { Component } from 'react'; +import React, { Component, type Node } from 'react'; import { Platform, SafeAreaView, StatusBar, View } from 'react-native'; import styles, { HEADER_PADDING, STATUSBAR_COLOR } from './styles'; @@ -11,14 +11,14 @@ import styles, { HEADER_PADDING, STATUSBAR_COLOR } from './styles'; const IOS10_PADDING = 20; /** - * The type of the React {@code Component} props of {@link ScreenHeader} + * The type of the React {@code Component} props of {@link Header} */ type Props = { /** * Children component(s). */ - children: React$Node, + children: Node, /** * The component's external style @@ -37,7 +37,7 @@ export default class Header extends Component { * * @returns {Object} */ - static get buttonStyle() { + static get buttonStyle(): Object { return styles.headerButton; } @@ -47,7 +47,7 @@ export default class Header extends Component { * * @returns {Object} */ - static get pageStyle() { + static get pageStyle(): Object { return styles.page; } @@ -56,7 +56,7 @@ export default class Header extends Component { * * @returns {Object} */ - static get textStyle() { + static get textStyle(): Object { return styles.headerText; } diff --git a/react/features/base/responsive-ui/actions.js b/react/features/base/responsive-ui/actions.js index 867f5ce27a..5edf676b4b 100644 --- a/react/features/base/responsive-ui/actions.js +++ b/react/features/base/responsive-ui/actions.js @@ -29,7 +29,7 @@ const REDUCED_UI_THRESHOLD = 300; * aspectRatio: Symbol * }} */ -export function setAspectRatio(width: number, height: number): Object { +export function setAspectRatio(width: number, height: number): Function { return (dispatch: Dispatch<*>, 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. @@ -59,7 +59,7 @@ export function setAspectRatio(width: number, height: number): Object { * reducedUI: boolean * }} */ -export function setReducedUI(width: number, height: number) { +export function setReducedUI(width: number, height: number): Function { return (dispatch: Dispatch<*>, getState: Function) => { const reducedUI = Math.min(width, height) < REDUCED_UI_THRESHOLD; diff --git a/react/features/base/responsive-ui/components/AspectRatioAware.js b/react/features/base/responsive-ui/components/AspectRatioAware.js index 4254e3ff0c..c9db74e1de 100644 --- a/react/features/base/responsive-ui/components/AspectRatioAware.js +++ b/react/features/base/responsive-ui/components/AspectRatioAware.js @@ -58,6 +58,7 @@ export function makeAspectRatioAware( } } + // $FlowFixMe return connect(_mapStateToProps)(AspectRatioAware); } diff --git a/react/features/base/responsive-ui/components/AspectRatioDetector.js b/react/features/base/responsive-ui/components/AspectRatioDetector.js index 66bbdb9357..c3fb3d14d5 100644 --- a/react/features/base/responsive-ui/components/AspectRatioDetector.js +++ b/react/features/base/responsive-ui/components/AspectRatioDetector.js @@ -1,7 +1,8 @@ // @flow -import React, { Component } from 'react'; +import React, { Component, type Node } from 'react'; import { connect } from 'react-redux'; +import { type Dispatch } from 'redux'; import { setAspectRatio } from '../actions'; import DimensionsDetector from './DimensionsDetector'; @@ -19,7 +20,7 @@ type Props = { /** * Any nested components. */ - children: React$Node + children: Node }; /** @@ -51,7 +52,7 @@ class AspectRatioDetector extends Component { * _onDimensionsChanged: Function * }} */ -function _mapDispatchToProps(dispatch) { +function _mapDispatchToProps(dispatch: Dispatch<*>) { return { /** * Handles the "on dimensions changed" event and dispatches aspect ratio diff --git a/react/features/base/responsive-ui/components/ReducedUIDetector.js b/react/features/base/responsive-ui/components/ReducedUIDetector.js index 2c7f1c2c64..7b3aafc0a7 100644 --- a/react/features/base/responsive-ui/components/ReducedUIDetector.js +++ b/react/features/base/responsive-ui/components/ReducedUIDetector.js @@ -1,7 +1,8 @@ // @flow -import React, { Component } from 'react'; +import React, { Component, type Node } from 'react'; import { connect } from 'react-redux'; +import { type Dispatch } from 'redux'; import { setReducedUI } from '../actions'; import DimensionsDetector from './DimensionsDetector'; @@ -20,7 +21,7 @@ type Props = { /** * Any nested components. */ - children: React$Node + children: Node }; /** @@ -52,7 +53,7 @@ class ReducedUIDetector extends Component { * _onDimensionsChanged: Function * }} */ -function _mapDispatchToProps(dispatch) { +function _mapDispatchToProps(dispatch: Dispatch<*>) { return { /** * Handles the "on dimensions changed" event and dispatches the diff --git a/react/features/base/testing/components/TestConnectionInfo.js b/react/features/base/testing/components/TestConnectionInfo.js index be1d4ec57d..82e3de5543 100644 --- a/react/features/base/testing/components/TestConnectionInfo.js +++ b/react/features/base/testing/components/TestConnectionInfo.js @@ -81,8 +81,7 @@ type State = { * a good thing). */ class TestConnectionInfo extends Component { - - _onStatsUpdated: Object => void + _onStatsUpdated: Object => void; /** * Initializes new TestConnectionInfo instance. diff --git a/react/features/calendar-sync/components/ConferenceNotification.native.js b/react/features/calendar-sync/components/ConferenceNotification.native.js index 6ce2415919..5d391e0b59 100644 --- a/react/features/calendar-sync/components/ConferenceNotification.native.js +++ b/react/features/calendar-sync/components/ConferenceNotification.native.js @@ -56,14 +56,14 @@ type State = { * screen when another meeting is about to start. */ class ConferenceNotification extends Component { - updateIntervalId: number; + updateIntervalId: *; /** * Constructor of the ConferenceNotification component. * * @inheritdoc */ - constructor(props) { + constructor(props: Props) { super(props); this.state = { @@ -97,7 +97,7 @@ class ConferenceNotification extends Component { * @inheritdoc */ componentWillUnmount() { - clearTimeout(this.updateIntervalId); + clearInterval(this.updateIntervalId); } /** @@ -160,7 +160,7 @@ class ConferenceNotification extends Component { return null; } - _getNotificationContentStyle: () => Array + _getNotificationContentStyle: () => Array; /** * Decides the color of the notification and some additional @@ -251,7 +251,6 @@ class ConferenceNotification extends Component { /** * Opens the meeting URL that the notification shows. * - * @param {string} url - The URL to open. * @private * @returns {void} */ diff --git a/react/features/invite/components/InviteButton.native.js b/react/features/invite/components/InviteButton.native.js index 48b2c231ac..c3c78eb185 100644 --- a/react/features/invite/components/InviteButton.native.js +++ b/react/features/invite/components/InviteButton.native.js @@ -1,6 +1,7 @@ // @flow import { connect } from 'react-redux'; +import type { Dispatch } from 'redux'; import { AbstractButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; @@ -105,7 +106,7 @@ class InviteButton extends AbstractButton { * }} * @private */ -function _mapDispatchToProps(dispatch) { +function _mapDispatchToProps(dispatch: Dispatch<*>) { return { /** * Launches native invite dialog. diff --git a/react/features/large-video/components/LargeVideoBackgroundCanvas.web.js b/react/features/large-video/components/LargeVideoBackgroundCanvas.web.js index 30e0073b1a..cdf2a43a72 100644 --- a/react/features/large-video/components/LargeVideoBackgroundCanvas.web.js +++ b/react/features/large-video/components/LargeVideoBackgroundCanvas.web.js @@ -60,7 +60,7 @@ type Props = { export class LargeVideoBackgroundCanvas extends Component { _canvasEl: Object; - _updateCanvasInterval: number; + _updateCanvasInterval: *; /** * Initializes new {@code LargeVideoBackgroundCanvas} instance. diff --git a/react/features/overlay/components/AbstractPageReloadOverlay.js b/react/features/overlay/components/AbstractPageReloadOverlay.js index c2ddc0152f..eaceedc3b9 100644 --- a/react/features/overlay/components/AbstractPageReloadOverlay.js +++ b/react/features/overlay/components/AbstractPageReloadOverlay.js @@ -76,7 +76,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { * @returns {boolean} - If this overlay needs to be rendered, {@code true}; * {@code false}, otherwise. */ - static needsRender(state) { + static needsRender(state: Object) { const conferenceError = state['features/base/conference'].error; const configError = state['features/base/config'].error; const connectionError = state['features/base/connection'].error; @@ -88,7 +88,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { || configError); } - _interval: ?number + _interval: *; state: { @@ -120,7 +120,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { * @type {string} */ title: string - } + }; /** * Initializes a new AbstractPageReloadOverlay instance. @@ -222,7 +222,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> { } /** - * Renders the button for relaod the page if necessary. + * Renders the button for reloading the page if necessary. * * @protected * @returns {ReactElement|null} diff --git a/react/features/recording/components/RecordingLabel.web.js b/react/features/recording/components/RecordingLabel.web.js index 392f97312e..69059384e3 100644 --- a/react/features/recording/components/RecordingLabel.web.js +++ b/react/features/recording/components/RecordingLabel.web.js @@ -98,7 +98,7 @@ type State = { * @extends {Component} */ class RecordingLabel extends AbstractRecordingLabel { - _autohideTimeout: number; + _autohideTimeout: *; state = { hidden: false diff --git a/react/features/speaker-stats/components/SpeakerStats.js b/react/features/speaker-stats/components/SpeakerStats.js index 30e82f21b9..f9f0c0cdcd 100644 --- a/react/features/speaker-stats/components/SpeakerStats.js +++ b/react/features/speaker-stats/components/SpeakerStats.js @@ -45,7 +45,7 @@ class SpeakerStats extends Component<*, *> { stats: {} }; - _updateInterval: number; + _updateInterval: *; /** * Initializes a new SpeakerStats instance.