浏览代码

ref|(TS) Convert some native components to TS (#13239)

factor2
Robert Pintilii 2 年前
父节点
当前提交
2af9dc88e6
没有帐户链接到提交者的电子邮件
共有 59 个文件被更改,包括 270 次插入274 次删除
  1. 34
    0
      package-lock.json
  2. 2
    0
      package.json
  3. 0
    0
      react/features/base/conference/middleware.native.ts
  4. 2
    2
      react/features/base/dialog/components/native/ConfirmDialog.tsx
  5. 1
    1
      react/features/base/dialog/constants.ts
  6. 1
    1
      react/features/base/icons/components/Icon.tsx
  7. 14
    14
      react/features/base/modal/components/JitsiKeyboardAvoidingView.tsx
  8. 16
    17
      react/features/base/modal/components/JitsiScreen.tsx
  9. 3
    4
      react/features/base/modal/components/functions.native.ts
  10. 0
    0
      react/features/base/modal/components/styles.ts
  11. 29
    25
      react/features/base/participants/components/ParticipantView.native.tsx
  12. 0
    2
      react/features/base/participants/components/styles.ts
  13. 1
    1
      react/features/base/react/components/AbstractContainer.ts
  14. 11
    13
      react/features/base/react/components/native/BaseIndicator.tsx
  15. 5
    7
      react/features/base/react/components/native/Image.tsx
  16. 10
    14
      react/features/base/react/components/native/Link.tsx
  17. 8
    12
      react/features/base/react/components/native/Linkify.tsx
  18. 0
    0
      react/features/base/react/components/native/Modal.tsx
  19. 8
    10
      react/features/base/react/components/native/TintedView.tsx
  20. 3
    4
      react/features/base/react/components/native/headerstyles.ts
  21. 0
    2
      react/features/base/react/components/native/indicatorStyles.ts
  22. 1
    1
      react/features/base/styles/functions.any.ts
  23. 3
    1
      react/features/base/testing/components/AbstractTestHint.ts
  24. 0
    2
      react/features/base/testing/components/TestConnectionInfo.js
  25. 1
    4
      react/features/base/testing/components/TestHint.android.tsx
  26. 1
    4
      react/features/base/testing/components/TestHint.ios.tsx
  27. 4
    6
      react/features/base/ui/components/JitsiThemeProvider.native.tsx
  28. 1
    3
      react/features/calendar-sync/components/AddMeetingUrlButton.native.ts
  29. 1
    3
      react/features/calendar-sync/components/JoinButton.native.ts
  30. 0
    0
      react/features/calendar-sync/components/MicrosoftSignInButton.native.ts
  31. 9
    11
      react/features/calendar-sync/components/UpdateCalendarEventDialog.native.tsx
  32. 0
    0
      react/features/chrome-extension-banner/components/ChromeExtensionBanner.native.ts
  33. 0
    0
      react/features/deep-linking/components/DeepLinkingDesktopPage.native.ts
  34. 0
    0
      react/features/deep-linking/components/DeepLinkingMobilePage.native.ts
  35. 0
    0
      react/features/deep-linking/components/NoMobileApp.native.ts
  36. 0
    0
      react/features/device-selection/components/DeviceSelector.native.ts
  37. 5
    4
      react/features/display-name/components/native/DisplayNameLabel.tsx
  38. 1
    5
      react/features/display-name/components/native/DisplayNamePrompt.tsx
  39. 0
    2
      react/features/display-name/components/native/styles.ts
  40. 3
    7
      react/features/etherpad/components/SharedDocumentButton.native.ts
  41. 13
    16
      react/features/etherpad/components/native/SharedDocument.tsx
  42. 0
    3
      react/features/etherpad/components/native/styles.ts
  43. 2
    2
      react/features/feedback/actions.web.ts
  44. 0
    0
      react/features/feedback/components/FeedbackButton.native.ts
  45. 0
    0
      react/features/feedback/components/FeedbackDialog.native.js
  46. 0
    0
      react/features/feedback/components/FeedbackDialog.native.ts
  47. 1
    1
      react/features/feedback/components/FeedbackDialog.web.tsx
  48. 0
    0
      react/features/feedback/functions.web.ts
  49. 2
    14
      react/features/old-client-notification/components/OldElectronAPPNotificationDescription.tsx
  50. 1
    0
      react/features/settings/components/native/SettingsView.tsx
  51. 21
    17
      react/features/shared-video/components/native/AbstractVideoManager.ts
  52. 17
    18
      react/features/shared-video/components/native/SharedVideo.tsx
  53. 20
    11
      react/features/shared-video/components/native/VideoManager.tsx
  54. 15
    7
      react/features/shared-video/components/native/YoutubeVideoManager.tsx
  55. 0
    0
      react/features/shared-video/components/native/styles.ts
  56. 0
    0
      react/features/unsupported-browser/components/JaasUnsupportedDesktopBrowser.ts
  57. 0
    0
      react/features/unsupported-browser/components/PageSelector.tsx
  58. 0
    2
      react/features/unsupported-browser/components/browserLinks.ts
  59. 0
    1
      tsconfig.native.json

+ 34
- 0
package-lock.json 查看文件

@@ -130,10 +130,12 @@
130 130
         "@types/audioworklet": "0.0.29",
131 131
         "@types/js-md5": "0.4.3",
132 132
         "@types/lodash": "4.14.182",
133
+        "@types/punycode": "2.1.0",
133 134
         "@types/react": "17.0.14",
134 135
         "@types/react-dom": "17.0.14",
135 136
         "@types/react-linkify": "1.0.1",
136 137
         "@types/react-native": "0.68.9",
138
+        "@types/react-native-video": "5.0.14",
137 139
         "@types/react-redux": "7.1.24",
138 140
         "@types/react-window": "1.8.5",
139 141
         "@types/resemblejs": "^4.1.0",
@@ -5761,6 +5763,12 @@
5761 5763
       "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
5762 5764
       "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
5763 5765
     },
5766
+    "node_modules/@types/punycode": {
5767
+      "version": "2.1.0",
5768
+      "resolved": "https://registry.npmjs.org/@types/punycode/-/punycode-2.1.0.tgz",
5769
+      "integrity": "sha512-PG5aLpW6PJOeV2fHRslP4IOMWn+G+Uq8CfnyJ+PDS8ndCbU+soO+fB3NKCKo0p/Jh2Y4aPaiQZsrOXFdzpcA6g==",
5770
+      "dev": true
5771
+    },
5764 5772
     "node_modules/@types/qs": {
5765 5773
       "version": "6.9.7",
5766 5774
       "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
@@ -5818,6 +5826,16 @@
5818 5826
         "@types/react": "^17"
5819 5827
       }
5820 5828
     },
5829
+    "node_modules/@types/react-native-video": {
5830
+      "version": "5.0.14",
5831
+      "resolved": "https://registry.npmjs.org/@types/react-native-video/-/react-native-video-5.0.14.tgz",
5832
+      "integrity": "sha512-KdcyY4HY/Q1l6f5qQA337BNVN+GsdZy836j9CXbWHZ008VVNzSlnJypJQPsnUgI0EPBw/uG/lyJk6cg9Jj1syg==",
5833
+      "dev": true,
5834
+      "dependencies": {
5835
+        "@types/react": "*",
5836
+        "@types/react-native": "*"
5837
+      }
5838
+    },
5821 5839
     "node_modules/@types/react-redux": {
5822 5840
       "version": "7.1.24",
5823 5841
       "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.24.tgz",
@@ -23792,6 +23810,12 @@
23792 23810
       "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",
23793 23811
       "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="
23794 23812
     },
23813
+    "@types/punycode": {
23814
+      "version": "2.1.0",
23815
+      "resolved": "https://registry.npmjs.org/@types/punycode/-/punycode-2.1.0.tgz",
23816
+      "integrity": "sha512-PG5aLpW6PJOeV2fHRslP4IOMWn+G+Uq8CfnyJ+PDS8ndCbU+soO+fB3NKCKo0p/Jh2Y4aPaiQZsrOXFdzpcA6g==",
23817
+      "dev": true
23818
+    },
23795 23819
     "@types/qs": {
23796 23820
       "version": "6.9.7",
23797 23821
       "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
@@ -23849,6 +23873,16 @@
23849 23873
         "@types/react": "^17"
23850 23874
       }
23851 23875
     },
23876
+    "@types/react-native-video": {
23877
+      "version": "5.0.14",
23878
+      "resolved": "https://registry.npmjs.org/@types/react-native-video/-/react-native-video-5.0.14.tgz",
23879
+      "integrity": "sha512-KdcyY4HY/Q1l6f5qQA337BNVN+GsdZy836j9CXbWHZ008VVNzSlnJypJQPsnUgI0EPBw/uG/lyJk6cg9Jj1syg==",
23880
+      "dev": true,
23881
+      "requires": {
23882
+        "@types/react": "*",
23883
+        "@types/react-native": "*"
23884
+      }
23885
+    },
23852 23886
     "@types/react-redux": {
23853 23887
       "version": "7.1.24",
23854 23888
       "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.24.tgz",

+ 2
- 0
package.json 查看文件

@@ -135,10 +135,12 @@
135 135
     "@types/audioworklet": "0.0.29",
136 136
     "@types/js-md5": "0.4.3",
137 137
     "@types/lodash": "4.14.182",
138
+    "@types/punycode": "2.1.0",
138 139
     "@types/react": "17.0.14",
139 140
     "@types/react-dom": "17.0.14",
140 141
     "@types/react-linkify": "1.0.1",
141 142
     "@types/react-native": "0.68.9",
143
+    "@types/react-native-video": "5.0.14",
142 144
     "@types/react-redux": "7.1.24",
143 145
     "@types/react-window": "1.8.5",
144 146
     "@types/resemblejs": "^4.1.0",

react/features/base/conference/middleware.native.js → react/features/base/conference/middleware.native.ts 查看文件


+ 2
- 2
react/features/base/dialog/components/native/ConfirmDialog.tsx 查看文件

@@ -19,7 +19,7 @@ interface IProps extends AbstractProps, WithTranslation {
19 19
     /**
20 20
      * The i18n key of the text label for the cancel button.
21 21
      */
22
-    cancelLabel: string;
22
+    cancelLabel?: string;
23 23
 
24 24
     /**
25 25
      * The React {@code Component} children.
@@ -29,7 +29,7 @@ interface IProps extends AbstractProps, WithTranslation {
29 29
     /**
30 30
      * The i18n key of the text label for the confirm button.
31 31
      */
32
-    confirmLabel: string;
32
+    confirmLabel?: string;
33 33
 
34 34
     /**
35 35
      * Dialog description key for translations.

+ 1
- 1
react/features/base/dialog/constants.ts 查看文件

@@ -30,7 +30,7 @@ export type DialogProps = {
30 30
     /**
31 31
      * The handler for onCancel event.
32 32
      */
33
-    onCancel: Function;
33
+    onCancel?: Function;
34 34
 
35 35
     /**
36 36
      * The handler for the event when submitting the dialog.

+ 1
- 1
react/features/base/icons/components/Icon.tsx 查看文件

@@ -90,7 +90,7 @@ interface IProps extends IIconProps {
90 90
     /**
91 91
      * Style object to be applied.
92 92
      */
93
-    style?: StyleType;
93
+    style?: StyleType | StyleType[];
94 94
 
95 95
     /**
96 96
      * TabIndex  for the Icon.

react/features/base/modal/components/JitsiKeyboardAvoidingView.js → react/features/base/modal/components/JitsiKeyboardAvoidingView.tsx 查看文件

@@ -1,5 +1,5 @@
1 1
 import { useHeaderHeight } from '@react-navigation/elements';
2
-import React, { ReactElement, useCallback, useEffect, useState } from 'react';
2
+import React, { useCallback, useEffect, useState } from 'react';
3 3
 import {
4 4
     Keyboard,
5 5
     KeyboardAvoidingView,
@@ -8,44 +8,44 @@ import {
8 8
 } from 'react-native';
9 9
 import { useSafeAreaInsets } from 'react-native-safe-area-context';
10 10
 
11
-import { StyleType } from '../../styles';
11
+import { StyleType } from '../../styles/functions.any';
12 12
 
13
-type Props = {
13
+interface IProps {
14 14
 
15 15
     /**
16 16
      * Adds bottom padding.
17 17
      */
18
-    addBottomPadding?: boolean,
18
+    addBottomPadding?: boolean;
19 19
 
20 20
     /**
21 21
      * The children component(s) of the Modal, to be rendered.
22 22
      */
23
-    children: ReactElement,
23
+    children: React.ReactNode;
24 24
 
25 25
     /**
26 26
      * Additional style to be appended to the KeyboardAvoidingView content container.
27 27
      */
28
-    contentContainerStyle?: StyleType,
28
+    contentContainerStyle?: StyleType;
29 29
 
30 30
     /**
31 31
      * Disable forced keyboard dismiss?
32 32
      */
33
-    disableForcedKeyboardDismiss?: boolean,
33
+    disableForcedKeyboardDismiss?: boolean;
34 34
 
35 35
     /**
36 36
      * Is a text input rendered at the bottom of the screen?
37 37
      */
38
-    hasBottomTextInput: boolean,
38
+    hasBottomTextInput: boolean;
39 39
 
40 40
     /**
41 41
      * Is the screen rendering a tab navigator?
42 42
      */
43
-    hasTabNavigator: boolean,
43
+    hasTabNavigator: boolean;
44 44
 
45 45
     /**
46 46
      * Additional style to be appended to the KeyboardAvoidingView.
47 47
      */
48
-    style?: StyleType
48
+    style?: StyleType;
49 49
 }
50 50
 
51 51
 const JitsiKeyboardAvoidingView = (
@@ -57,7 +57,7 @@ const JitsiKeyboardAvoidingView = (
57 57
             hasTabNavigator,
58 58
             hasBottomTextInput,
59 59
             style
60
-        }: Props) => {
60
+        }: IProps) => {
61 61
     const headerHeight = useHeaderHeight();
62 62
     const insets = useSafeAreaInsets();
63 63
     const [ bottomPadding, setBottomPadding ] = useState(insets.bottom);
@@ -77,11 +77,11 @@ const JitsiKeyboardAvoidingView = (
77 77
     const iosVerticalOffset
78 78
         = headerHeight + noNotchDevicePadding + tabNavigatorPadding;
79 79
     const androidVerticalOffset = hasBottomTextInput
80
-        ? headerHeight + StatusBar.currentHeight : headerHeight;
80
+        ? headerHeight + Number(StatusBar.currentHeight) : headerHeight;
81 81
 
82 82
     // Tells the view what to do with taps
83
-    const shouldSetResponse = useCallback(() => !disableForcedKeyboardDismiss);
84
-    const onRelease = useCallback(() => Keyboard.dismiss());
83
+    const shouldSetResponse = useCallback(() => !disableForcedKeyboardDismiss, []);
84
+    const onRelease = useCallback(() => Keyboard.dismiss(), []);
85 85
 
86 86
     return (
87 87
         <KeyboardAvoidingView

react/features/base/modal/components/JitsiScreen.js → react/features/base/modal/components/JitsiScreen.tsx 查看文件

@@ -1,59 +1,58 @@
1 1
 import React from 'react';
2 2
 import { View } from 'react-native';
3
-import { SafeAreaView } from 'react-native-safe-area-context';
3
+import { Edge, SafeAreaView } from 'react-native-safe-area-context';
4 4
 
5
-import { StyleType } from '../../styles';
5
+import { StyleType } from '../../styles/functions.any';
6 6
 
7 7
 import JitsiKeyboardAvoidingView from './JitsiKeyboardAvoidingView';
8 8
 import styles from './styles';
9 9
 
10
-
11
-type Props = {
10
+interface IProps {
12 11
 
13 12
     /**
14 13
      * Adds bottom padding.
15 14
      */
16
-    addBottomPadding?: boolean,
15
+    addBottomPadding?: boolean;
17 16
 
18 17
     /**
19
-     * Additional style to be appended to the KeyboardAvoidingView content container.
18
+     * The children component(s) of the Modal, to be rendered.
20 19
      */
21
-    contentContainerStyle?: StyleType,
20
+    children: React.ReactNode;
22 21
 
23 22
     /**
24
-     * The children component(s) of the Modal, to be rendered.
23
+     * Additional style to be appended to the KeyboardAvoidingView content container.
25 24
      */
26
-    children: React.ReactNode,
25
+    contentContainerStyle?: StyleType;
27 26
 
28 27
     /**
29 28
      * Disabled forced keyboard dismiss?
30 29
      */
31
-    disableForcedKeyboardDismiss?: boolean,
30
+    disableForcedKeyboardDismiss?: boolean;
32 31
 
33 32
     /**
34 33
      * Optional function that renders a footer component, if needed.
35 34
      */
36
-    footerComponent?: Function,
35
+    footerComponent?: Function;
37 36
 
38 37
     /**
39 38
      * Is a text input rendered at the bottom of the screen?
40 39
      */
41
-    hasBottomTextInput?: boolean,
40
+    hasBottomTextInput?: boolean;
42 41
 
43 42
     /**
44 43
      * Is the screen rendering a tab navigator?
45 44
      */
46
-    hasTabNavigator?: boolean,
45
+    hasTabNavigator?: boolean;
47 46
 
48 47
     /**
49 48
      * Insets for the SafeAreaView.
50 49
      */
51
-    safeAreaInsets?: Array,
50
+    safeAreaInsets?: Edge[];
52 51
 
53 52
     /**
54 53
      * Additional style to be appended to the KeyboardAvoidingView containing the content of the modal.
55 54
      */
56
-    style?: StyleType
55
+    style?: StyleType;
57 56
 }
58 57
 
59 58
 const JitsiScreen = ({
@@ -66,7 +65,7 @@ const JitsiScreen = ({
66 65
     hasBottomTextInput = false,
67 66
     safeAreaInsets = [ 'left', 'right' ],
68 67
     style
69
-}: Props) => {
68
+}: IProps) => {
70 69
     const renderContent = () => (
71 70
         <JitsiKeyboardAvoidingView
72 71
             addBottomPadding = { addBottomPadding }
@@ -80,7 +79,7 @@ const JitsiScreen = ({
80 79
                 style = { styles.safeArea }>
81 80
                 { children }
82 81
             </SafeAreaView>
83
-            { footerComponent && footerComponent() }
82
+            { footerComponent?.() }
84 83
         </JitsiKeyboardAvoidingView>
85 84
     );
86 85
 

react/features/base/modal/components/functions.native.js → react/features/base/modal/components/functions.native.ts 查看文件

@@ -1,5 +1,4 @@
1
-// @flow
2
-
1
+import { IStateful } from '../../app/types';
3 2
 import { toState } from '../../redux/functions';
4 3
 
5 4
 /**
@@ -11,7 +10,7 @@ import { toState } from '../../redux/functions';
11 10
  * features/base/config.
12 11
  * @returns {number}.
13 12
  */
14
-export function getClientWidth(stateful: Object) {
13
+export function getClientWidth(stateful: IStateful) {
15 14
     const state = toState(stateful)['features/base/responsive-ui'];
16 15
 
17 16
     return state.clientWidth;
@@ -26,7 +25,7 @@ export function getClientWidth(stateful: Object) {
26 25
  * features/base/config.
27 26
  * @returns {number}.
28 27
  */
29
-export function getClientHeight(stateful: Object) {
28
+export function getClientHeight(stateful: IStateful) {
30 29
     const state = toState(stateful)['features/base/responsive-ui'];
31 30
 
32 31
     return state.clientHeight;

react/features/base/modal/components/styles.js → react/features/base/modal/components/styles.ts 查看文件


react/features/base/participants/components/ParticipantView.native.js → react/features/base/participants/components/ParticipantView.native.tsx 查看文件

@@ -1,20 +1,24 @@
1 1
 import React, { Component } from 'react';
2
-import { Text, View } from 'react-native';
2
+import { GestureResponderEvent, Text, TextStyle, View, ViewStyle } from 'react-native';
3 3
 import { connect } from 'react-redux';
4 4
 
5
+import { IReduxState } from '../../../app/types';
5 6
 import {
6 7
     isTrackStreamingStatusActive,
7 8
     isTrackStreamingStatusInactive
8 9
 } from '../../../connection-indicator/functions';
9 10
 import SharedVideo from '../../../shared-video/components/native/SharedVideo';
11
+import { IStateful } from '../../app/types';
10 12
 import Avatar from '../../avatar/components/Avatar';
11 13
 import { translate } from '../../i18n/functions';
12 14
 import VideoTrack from '../../media/components/native/VideoTrack';
13 15
 import { shouldRenderVideoTrack } from '../../media/functions';
14 16
 import Container from '../../react/components/native/Container';
15 17
 import { toState } from '../../redux/functions';
18
+import { StyleType } from '../../styles/functions.any';
16 19
 import TestHint from '../../testing/components/TestHint';
17 20
 import { getVideoTrackByParticipant } from '../../tracks/functions';
21
+import { ITrack } from '../../tracks/types';
18 22
 import { getParticipantById, getParticipantDisplayName, isSharedVideoParticipant } from '../functions';
19 23
 
20 24
 import styles from './styles';
@@ -22,69 +26,69 @@ import styles from './styles';
22 26
 /**
23 27
  * The type of the React {@link Component} props of {@link ParticipantView}.
24 28
  */
25
-type Props = {
29
+interface IProps {
26 30
 
27 31
     /**
28 32
      * Whether the connection is inactive or not.
29 33
      *
30 34
      * @private
31 35
      */
32
-    _isConnectionInactive: boolean,
36
+    _isConnectionInactive: boolean;
33 37
 
34 38
     /**
35 39
      * Whether the participant is a shared video participant.
36 40
      */
37
-    _isSharedVideoParticipant: boolean,
41
+    _isSharedVideoParticipant: boolean;
38 42
 
39 43
     /**
40 44
      * The name of the participant which this component represents.
41 45
      *
42 46
      * @private
43 47
      */
44
-    _participantName: string,
48
+    _participantName: string;
45 49
 
46 50
     /**
47 51
      * True if the video should be rendered, false otherwise.
48 52
      */
49
-    _renderVideo: boolean,
53
+    _renderVideo: boolean;
50 54
 
51 55
     /**
52 56
      * The video Track of the participant with {@link #participantId}.
53 57
      */
54
-    _videoTrack: Object,
58
+    _videoTrack?: ITrack;
55 59
 
56 60
     /**
57 61
      * The avatar size.
58 62
      */
59
-    avatarSize: number,
63
+    avatarSize: number;
60 64
 
61 65
     /**
62 66
      * Whether video should be disabled for his view.
63 67
      */
64
-    disableVideo: ?boolean,
68
+    disableVideo?: boolean;
65 69
 
66 70
     /**
67 71
      * Callback to invoke when the {@code ParticipantView} is clicked/pressed.
68 72
      */
69
-    onPress: Function,
73
+    onPress: (e?: GestureResponderEvent) => void;
70 74
 
71 75
     /**
72 76
      * The ID of the participant (to be) depicted by {@link ParticipantView}.
73 77
      *
74 78
      * @public
75 79
      */
76
-    participantId: string,
80
+    participantId: string;
77 81
 
78 82
     /**
79 83
      * The style, if any, to apply to {@link ParticipantView} in addition to its
80 84
      * default style.
81 85
      */
82
-    style: Object,
86
+    style: StyleType;
83 87
 
84 88
     /**
85 89
      * The function to translate human-readable text.
86 90
      */
87
-    t: Function,
91
+    t: Function;
88 92
 
89 93
     /**
90 94
      * The test hint id which can be used to locate the {@code ParticipantView}
@@ -92,26 +96,26 @@ type Props = {
92 96
      * {@code participantId} with the following format will be used:
93 97
      * {@code `org.jitsi.meet.Participant#${participantId}`}.
94 98
      */
95
-    testHintId: ?string,
99
+    testHintId?: string;
96 100
 
97 101
     /**
98 102
      * Indicates if the connectivity info label should be shown, if appropriate.
99 103
      * It will be shown in case the connection is interrupted.
100 104
      */
101
-    useConnectivityInfoLabel: boolean,
105
+    useConnectivityInfoLabel: boolean;
102 106
 
103 107
     /**
104 108
      * The z-order of the {@link Video} of {@link ParticipantView} in the
105 109
      * stacking space of all {@code Video}s. For more details, refer to the
106 110
      * {@code zOrder} property of the {@code Video} class for React Native.
107 111
      */
108
-    zOrder: number,
112
+    zOrder: number;
109 113
 
110 114
     /**
111 115
      * Indicates whether zooming (pinch to zoom and/or drag) is enabled.
112 116
      */
113
-    zoomEnabled: boolean
114
-};
117
+    zoomEnabled: boolean;
118
+}
115 119
 
116 120
 /**
117 121
  * Implements a React Component which depicts a specific participant's avatar
@@ -119,7 +123,7 @@ type Props = {
119 123
  *
120 124
  * @augments Component
121 125
  */
122
-class ParticipantView extends Component<Props> {
126
+class ParticipantView extends Component<IProps> {
123 127
 
124 128
     /**
125 129
      * Renders the inactive connection status label.
@@ -144,8 +148,8 @@ class ParticipantView extends Component<Props> {
144 148
         return (
145 149
             <View
146 150
                 pointerEvents = 'box-none'
147
-                style = { containerStyle }>
148
-                <Text style = { styles.connectionInfoText }>
151
+                style = { containerStyle as ViewStyle }>
152
+                <Text style = { styles.connectionInfoText as TextStyle }>
149 153
                     { t('connection.LOW_BANDWIDTH', { displayName }) }
150 154
                 </Text>
151 155
             </View>
@@ -200,7 +204,7 @@ class ParticipantView extends Component<Props> {
200 204
                         zoomEnabled = { this.props.zoomEnabled } /> }
201 205
 
202 206
                 { !renderSharedVideo && !renderVideo
203
-                    && <View style = { styles.avatarContainer }>
207
+                    && <View style = { styles.avatarContainer as ViewStyle }>
204 208
                         <Avatar
205 209
                             participantId = { this.props.participantId }
206 210
                             size = { this.props.avatarSize } />
@@ -221,9 +225,9 @@ class ParticipantView extends Component<Props> {
221 225
  * @param {Object} ownProps - The React {@code Component} props passed to the
222 226
  * associated (instance of) {@code ParticipantView}.
223 227
  * @private
224
- * @returns {Props}
228
+ * @returns {IProps}
225 229
  */
226
-function _mapStateToProps(state, ownProps) {
230
+function _mapStateToProps(state: IReduxState, ownProps: any) {
227 231
     const { disableVideo, participantId } = ownProps;
228 232
     const participant = getParticipantById(state, participantId);
229 233
     const videoTrack = getVideoTrackByParticipant(state, participant);
@@ -245,7 +249,7 @@ function _mapStateToProps(state, ownProps) {
245 249
  * @param {string} id - The ID of the participant.
246 250
  * @returns {boolean}
247 251
  */
248
-function shouldRenderParticipantVideo(stateful, id) {
252
+function shouldRenderParticipantVideo(stateful: IStateful, id: string) {
249 253
     const state = toState(stateful);
250 254
     const participant = getParticipantById(state, id);
251 255
 

react/features/base/participants/components/styles.js → react/features/base/participants/components/styles.ts 查看文件

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { BoxModel } from '../../styles/components/styles/BoxModel';
4 2
 import { ColorPalette } from '../../styles/components/styles/ColorPalette';
5 3
 

+ 1
- 1
react/features/base/react/components/AbstractContainer.ts 查看文件

@@ -58,7 +58,7 @@ export interface IProps {
58 58
      * undefined and {@link onClick} is defined, {@code touchFeedback} is
59 59
      * considered defined as {@code true}.
60 60
      */
61
-    touchFeedback?: Function;
61
+    touchFeedback?: boolean;
62 62
 
63 63
     /**
64 64
      * Color to display when clicked.

react/features/base/react/components/native/BaseIndicator.js → react/features/base/react/components/native/BaseIndicator.tsx 查看文件

@@ -1,15 +1,13 @@
1
-// @flow
2
-
3 1
 import React, { Component } from 'react';
4
-import { View } from 'react-native';
2
+import { View, ViewStyle } from 'react-native';
5 3
 
6 4
 import Icon from '../../../icons/components/Icon';
7
-import { type StyleType } from '../../../styles';
5
+import { StyleType } from '../../../styles/functions.any';
8 6
 
9
-import styles from './indicatorstyles';
7
+import styles from './indicatorStyles';
10 8
 import { BASE_INDICATOR } from './styles';
11 9
 
12
-type Props = {
10
+interface IProps {
13 11
 
14 12
     /**
15 13
      * Overwritten background color when indicator is highlighted.
@@ -19,24 +17,24 @@ type Props = {
19 17
     /**
20 18
      * True if a highlighted background has to be applied.
21 19
      */
22
-    highlight: boolean,
20
+    highlight?: boolean;
23 21
 
24 22
     /**
25 23
      * The name of the icon to be used as the indicator.
26 24
      */
27
-    icon: string,
25
+    icon: Function;
28 26
 
29 27
     /**
30 28
      * Additional style to be applied to the icon element.
31 29
      */
32
-    iconStyle: StyleType
33
-};
30
+    iconStyle?: StyleType;
31
+}
34 32
 
35 33
 /**
36 34
  * Implements a base indicator to be reused across all native indicators on
37 35
  * the filmstrip.
38 36
  */
39
-export default class BaseIndicator extends Component<Props> {
37
+export default class BaseIndicator extends Component<IProps> {
40 38
     /**
41 39
      * Implements React's {@link Component#render()}.
42 40
      *
@@ -47,12 +45,12 @@ export default class BaseIndicator extends Component<Props> {
47 45
 
48 46
         return (
49 47
             <View
50
-                style = { BASE_INDICATOR }>
48
+                style = { BASE_INDICATOR as ViewStyle }>
51 49
                 <Icon
52 50
                     src = { icon }
53 51
                     style = { [
54 52
                         styles.indicator,
55
-                        iconStyle
53
+                        iconStyle ?? {}
56 54
                     ] } />
57 55
             </View>
58 56
         );

react/features/base/react/components/native/Image.js → react/features/base/react/components/native/Image.tsx 查看文件

@@ -1,30 +1,28 @@
1
-// @flow
2
-
3 1
 import React, { Component } from 'react';
4 2
 import { Image } from 'react-native';
5 3
 
6 4
 /**
7 5
  * The type of the React {@code Component} props of {@link Image}.
8 6
  */
9
-type Props = {
7
+interface IProps {
10 8
 
11 9
     /**
12 10
      * The ImageSource to be rendered as image.
13 11
      */
14
-    src: Object,
12
+    src: Object;
15 13
 
16 14
     /**
17 15
      * The component's external style.
18 16
      */
19
-    style: Object
20
-};
17
+    style: Object;
18
+}
21 19
 
22 20
 /**
23 21
  * A component rendering aN IMAGE.
24 22
  *
25 23
  * @augments Component
26 24
  */
27
-export default class ImageImpl extends Component<Props> {
25
+export default class ImageImpl extends Component<IProps> {
28 26
     /**
29 27
      * Implements React's {@link Component#render()}.
30 28
      *

react/features/base/react/components/native/Link.js → react/features/base/react/components/native/Link.tsx 查看文件

@@ -1,5 +1,3 @@
1
-/* @flow */
2
-
3 1
 import React, { Component } from 'react';
4 2
 import { Linking } from 'react-native';
5 3
 
@@ -8,40 +6,40 @@ import Text from './Text';
8 6
 /**
9 7
  * The type of the React {@code Component} props of {@link Link}.
10 8
  */
11
-type Props = {
9
+interface IProps {
12 10
 
13 11
     /**
14 12
      * The children to be displayed within this Link.
15 13
      */
16
-    children: React$Node,
14
+    children: React.ReactNode;
17 15
 
18 16
     /**
19 17
      * Notifies that this Link failed to open the URL associated with it.
20 18
      */
21
-    onLinkingOpenURLRejected?: Function,
19
+    onLinkingOpenURLRejected?: Function;
22 20
 
23 21
     /**
24 22
      * The CSS style to be applied to this Link for the purposes of display.
25 23
      */
26
-    style?: Object,
24
+    style?: Object;
27 25
 
28 26
     /**
29 27
      * The URL to be opened when this Link is clicked/pressed.
30 28
      */
31
-    url: string
32
-};
29
+    url: string;
30
+}
33 31
 
34 32
 /**
35 33
  * Implements a (hyper)link to a URL in the fashion of the HTML anchor element
36 34
  * and its href attribute.
37 35
  */
38
-export default class Link extends Component<Props> {
36
+export default class Link extends Component<IProps> {
39 37
     /**
40 38
      * Initializes a new Link instance.
41 39
      *
42 40
      * @param {Object} props - Component properties.
43 41
      */
44
-    constructor(props: Props) {
42
+    constructor(props: IProps) {
45 43
         super(props);
46 44
 
47 45
         // Bind event handlers so they are only bound once for every instance.
@@ -71,14 +69,12 @@ export default class Link extends Component<Props> {
71 69
      * @private
72 70
      * @returns {void}
73 71
      */
74
-    _onLinkingOpenURLRejected(reason) {
72
+    _onLinkingOpenURLRejected(reason: Error) {
75 73
         const onRejected = this.props.onLinkingOpenURLRejected;
76 74
 
77
-        onRejected && onRejected(reason);
75
+        onRejected?.(reason);
78 76
     }
79 77
 
80
-    _onPress: () => void;
81
-
82 78
     /**
83 79
      * Handles press on this Link. Opens the URL associated with this Link.
84 80
      *

react/features/base/react/components/native/Linkify.js → react/features/base/react/components/native/Linkify.tsx 查看文件

@@ -1,42 +1,40 @@
1
-// @flow
2
-
3 1
 import punycode from 'punycode';
4 2
 import React, { Component } from 'react';
5 3
 import ReactLinkify from 'react-linkify';
6 4
 import { Text } from 'react-native';
7 5
 
8
-import { type StyleType } from '../../../styles';
6
+import { StyleType } from '../../../styles/functions.any';
9 7
 
10 8
 import Link from './Link';
11 9
 
12
-type Props = {
10
+interface IProps {
13 11
 
14 12
     /**
15 13
      * The children of the component.
16 14
      */
17
-    children: React$Node,
15
+    children: React.ReactNode;
18 16
 
19 17
     /**
20 18
      * The extra styles to be applied to links.
21 19
      */
22
-    linkStyle: StyleType,
20
+    linkStyle: StyleType;
23 21
 
24 22
     /**
25 23
      * The extra styles to be applied to text.
26 24
      */
27
-    style?: StyleType
28
-};
25
+    style?: StyleType;
26
+}
29 27
 
30 28
 /**
31 29
  * Implements a react native wrapper for the react-linkify component.
32 30
  */
33
-export default class Linkify extends Component<Props> {
31
+export default class Linkify extends Component<IProps> {
34 32
     /**
35 33
      * Initiates a new {@code Component}.
36 34
      *
37 35
      * @inheritdoc
38 36
      */
39
-    constructor(props: Props) {
37
+    constructor(props: IProps) {
40 38
         super(props);
41 39
 
42 40
         this._componentDecorator = this._componentDecorator.bind(this);
@@ -60,8 +58,6 @@ export default class Linkify extends Component<Props> {
60 58
         );
61 59
     }
62 60
 
63
-    _componentDecorator: (string, string, number) => React$Node;
64
-
65 61
     /**
66 62
      * Implements a component decorator for react-linkify.
67 63
      *

react/features/base/react/components/native/Modal.js → react/features/base/react/components/native/Modal.tsx 查看文件


react/features/base/react/components/native/TintedView.js → react/features/base/react/components/native/TintedView.tsx 查看文件

@@ -1,7 +1,5 @@
1
-// @flow
2
-
3 1
 import React, { Component } from 'react';
4
-import { StyleSheet, View } from 'react-native';
2
+import { StyleSheet, View, ViewStyle } from 'react-native';
5 3
 
6 4
 import { TINTED_VIEW_DEFAULT } from './styles';
7 5
 
@@ -17,24 +15,24 @@ const BASE_STYLE = {
17 15
 /**
18 16
  * {@code TintedView}'s React {@code Component} prop types.
19 17
  */
20
-type Props = {
18
+interface IProps {
21 19
 
22 20
     /**
23 21
      * The children components of this component.
24 22
      */
25
-    children?: React$Node,
23
+    children?: React.ReactNode;
26 24
 
27 25
     /**
28 26
      * Style to override the base style.
29 27
      */
30
-    style: Object
31
-};
28
+    style?: Object;
29
+}
32 30
 
33 31
 /**
34 32
  * Implements a component aimed at covering another view and tinting it with
35 33
  * the given color and opacity.
36 34
  */
37
-export default class TintedView extends Component<Props> {
35
+export default class TintedView extends Component<IProps> {
38 36
     /**
39 37
      * Implements React's {@link Component#render()}.
40 38
      *
@@ -48,7 +46,7 @@ export default class TintedView extends Component<Props> {
48 46
         return (
49 47
             <View
50 48
                 pointerEvents = 'box-none'
51
-                style = { BASE_STYLE }>
49
+                style = { BASE_STYLE as ViewStyle }>
52 50
                 <View
53 51
                     pointerEvents = 'none'
54 52
                     style = { [
@@ -58,7 +56,7 @@ export default class TintedView extends Component<Props> {
58 56
                     ] } />
59 57
                 <View
60 58
                     pointerEvents = 'box-none'
61
-                    style = { BASE_STYLE }>
59
+                    style = { BASE_STYLE as ViewStyle }>
62 60
                     { children }
63 61
                 </View>
64 62
             </View>

react/features/base/react/components/native/headerstyles.js → react/features/base/react/components/native/headerstyles.ts 查看文件

@@ -1,9 +1,8 @@
1
-// @flex
2
-
3 1
 import { StyleSheet } from 'react-native';
4 2
 
5
-import { ColorSchemeRegistry, schemeColor } from '../../../color-scheme';
6
-import { BoxModel } from '../../../styles';
3
+import ColorSchemeRegistry from '../../../color-scheme/ColorSchemeRegistry';
4
+import { schemeColor } from '../../../color-scheme/functions';
5
+import { BoxModel } from '../../../styles/components/styles/BoxModel';
7 6
 
8 7
 const HEADER_FONT_SIZE = 18;
9 8
 const HEADER_HEIGHT = 48;

react/features/base/react/components/native/indicatorstyles.js → react/features/base/react/components/native/indicatorStyles.ts 查看文件

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { ColorPalette } from '../../../styles/components/styles/ColorPalette';
4 2
 
5 3
 export default {

+ 1
- 1
react/features/base/styles/functions.any.ts 查看文件

@@ -46,7 +46,7 @@ const _WELL_KNOWN_NUMBER_PROPERTIES = [ 'height', 'width' ];
46 46
  * @param {Styletype} st - The complex style type.
47 47
  * @returns {Object}
48 48
  */
49
-export function styleTypeToObject(st: StyleType) {
49
+export function styleTypeToObject(st: StyleType | StyleType[]) {
50 50
     if (!st) {
51 51
         return {};
52 52
     }

+ 3
- 1
react/features/base/testing/components/AbstractTestHint.ts 查看文件

@@ -1,3 +1,5 @@
1
+import { GestureResponderEvent } from 'react-native';
2
+
1 3
 import { IReduxState } from '../../../app/types';
2 4
 import { isTestModeEnabled } from '../functions';
3 5
 
@@ -28,7 +30,7 @@ export type TestHintProps = {
28 30
      * The optional "on press" handler which can be used to bind a click handler
29 31
      * to a {@link TestHint}.
30 32
      */
31
-    onPress?: Function;
33
+    onPress?: (e?: GestureResponderEvent) => void;
32 34
 
33 35
     /**
34 36
      * The test hint's (text) value which is to be consumed by the tests.

+ 0
- 2
react/features/base/testing/components/TestConnectionInfo.js 查看文件

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import React, { Component, Fragment } from 'react';
4 2
 import { connect } from 'react-redux';
5 3
 

react/features/base/testing/components/TestHint.android.js → react/features/base/testing/components/TestHint.android.tsx 查看文件

@@ -1,11 +1,8 @@
1
-/* @flow */
2
-
3 1
 import React, { Component } from 'react';
4 2
 import { Text } from 'react-native';
5 3
 import { connect } from 'react-redux';
6 4
 
7
-import type { TestHintProps } from './AbstractTestHint';
8
-import { _mapStateToProps } from './AbstractTestHint';
5
+import { TestHintProps, _mapStateToProps } from './AbstractTestHint';
9 6
 
10 7
 /**
11 8
  * The Android version of <code>TestHint</code>. It will put the identifier,

react/features/base/testing/components/TestHint.ios.js → react/features/base/testing/components/TestHint.ios.tsx 查看文件

@@ -1,11 +1,8 @@
1
-/* @flow */
2
-
3 1
 import React, { Component } from 'react';
4 2
 import { Text } from 'react-native';
5 3
 import { connect } from 'react-redux';
6 4
 
7
-import type { TestHintProps } from './AbstractTestHint';
8
-import { _mapStateToProps } from './AbstractTestHint';
5
+import { TestHintProps, _mapStateToProps } from './AbstractTestHint';
9 6
 
10 7
 /**
11 8
  * This is the iOS version of the TestHint.

react/features/base/ui/components/JitsiThemeProvider.native.js → react/features/base/ui/components/JitsiThemeProvider.native.tsx 查看文件

@@ -1,16 +1,14 @@
1
-// @flow
2
-
3 1
 import * as React from 'react';
4 2
 import { Provider as PaperProvider } from 'react-native-paper';
5 3
 
6 4
 import BaseTheme from './BaseTheme.native';
7 5
 
8
-type Props = {
6
+interface IProps {
9 7
 
10
-   /**
8
+    /**
11 9
     * The children of the component.
12 10
     */
13
-    children: React.ChildrenArray<any>
11
+    children: React.ReactNode;
14 12
 }
15 13
 
16 14
 /**
@@ -19,6 +17,6 @@ type Props = {
19 17
  * @param {Object} props - The props of the component.
20 18
  * @returns {React.ReactNode}
21 19
  */
22
-export default function JitsiThemePaperProvider(props: Props) {
20
+export default function JitsiThemePaperProvider(props: IProps) {
23 21
     return <PaperProvider theme = { BaseTheme }>{ props.children }</PaperProvider>;
24 22
 }

react/features/calendar-sync/components/AddMeetingUrlButton.native.js → react/features/calendar-sync/components/AddMeetingUrlButton.native.ts 查看文件

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { Component } from 'react';
4 2
 
5 3
 /**
@@ -7,7 +5,7 @@ import { Component } from 'react';
7 5
  *
8 6
  * @augments Component
9 7
  */
10
-class AddMeetingUrlButton extends Component<*> {
8
+class AddMeetingUrlButton extends Component<void> {
11 9
     /**
12 10
      * Implements React's {@link Component#render}.
13 11
      *

react/features/calendar-sync/components/JoinButton.native.js → react/features/calendar-sync/components/JoinButton.native.ts 查看文件

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import { Component } from 'react';
4 2
 
5 3
 /**
@@ -7,7 +5,7 @@ import { Component } from 'react';
7 5
  *
8 6
  * @augments Component
9 7
  */
10
-class JoinButton extends Component<*> {
8
+class JoinButton extends Component<void> {
11 9
     /**
12 10
      * Implements React's {@link Component#render}.
13 11
      *

react/features/base/toolbox/components/OverflowMenuItem.native.js → react/features/calendar-sync/components/MicrosoftSignInButton.native.ts 查看文件


react/features/calendar-sync/components/UpdateCalendarEventDialog.native.js → react/features/calendar-sync/components/UpdateCalendarEventDialog.native.tsx 查看文件

@@ -1,35 +1,35 @@
1
-// @flow
2
-
3 1
 import React, { Component } from 'react';
2
+import { WithTranslation } from 'react-i18next';
4 3
 import { connect } from 'react-redux';
5 4
 
5
+import { IStore } from '../../app/types';
6 6
 import ConfirmDialog from '../../base/dialog/components/native/ConfirmDialog';
7 7
 import { translate } from '../../base/i18n/functions';
8 8
 import { updateCalendarEvent } from '../actions';
9 9
 
10
-type Props = {
10
+interface IProps extends WithTranslation {
11 11
 
12 12
     /**
13 13
      * The Redux dispatch function.
14 14
      */
15
-    dispatch: Function,
15
+    dispatch: IStore['dispatch'];
16 16
 
17 17
     /**
18 18
      * The ID of the event to be updated.
19 19
      */
20
-    eventId: string
21
-};
20
+    eventId: string;
21
+}
22 22
 
23 23
 /**
24 24
  * Component for the add Jitsi link confirm dialog.
25 25
  */
26
-class UpdateCalendarEventDialog extends Component<Props> {
26
+class UpdateCalendarEventDialog extends Component<IProps> {
27 27
     /**
28 28
      * Initializes a new {@code UpdateCalendarEventDialog} instance.
29 29
      *
30 30
      * @inheritdoc
31 31
      */
32
-    constructor(props: Props) {
32
+    constructor(props: IProps) {
33 33
         super(props);
34 34
 
35 35
         this._onSubmit = this._onSubmit.bind(this);
@@ -49,8 +49,6 @@ class UpdateCalendarEventDialog extends Component<Props> {
49 49
         );
50 50
     }
51 51
 
52
-    _onSubmit: () => boolean;
53
-
54 52
     /**
55 53
      * Callback for the confirm button.
56 54
      *
@@ -58,7 +56,7 @@ class UpdateCalendarEventDialog extends Component<Props> {
58 56
      * @returns {boolean} - True (to note that the modal should be closed).
59 57
      */
60 58
     _onSubmit() {
61
-        this.props.dispatch(updateCalendarEvent(this.props.eventId, ''));
59
+        this.props.dispatch(updateCalendarEvent(this.props.eventId));
62 60
 
63 61
         return true;
64 62
     }

react/features/calendar-sync/components/MicrosoftSignInButton.native.js → react/features/chrome-extension-banner/components/ChromeExtensionBanner.native.ts 查看文件


react/features/chrome-extension-banner/components/ChromeExtensionBanner.native.js → react/features/deep-linking/components/DeepLinkingDesktopPage.native.ts 查看文件


react/features/deep-linking/components/DeepLinkingDesktopPage.native.js → react/features/deep-linking/components/DeepLinkingMobilePage.native.ts 查看文件


react/features/deep-linking/components/DeepLinkingMobilePage.native.js → react/features/deep-linking/components/NoMobileApp.native.ts 查看文件


react/features/deep-linking/components/NoMobileApp.native.js → react/features/device-selection/components/DeviceSelector.native.ts 查看文件


+ 5
- 4
react/features/display-name/components/native/DisplayNameLabel.tsx 查看文件

@@ -1,5 +1,5 @@
1 1
 import * as React from 'react';
2
-import { Text, View } from 'react-native';
2
+import { Text, TextStyle, View, ViewStyle } from 'react-native';
3 3
 import { connect } from 'react-redux';
4 4
 
5 5
 import { IReduxState } from '../../../app/types';
@@ -9,7 +9,6 @@ import {
9 9
     isScreenShareParticipant
10 10
 } from '../../../base/participants/functions';
11 11
 
12
-// @ts-ignore
13 12
 import styles from './styles';
14 13
 
15 14
 interface IProps {
@@ -50,10 +49,12 @@ class DisplayNameLabel extends React.Component<IProps> {
50 49
         }
51 50
 
52 51
         return (
53
-            <View style = { this.props.contained ? styles.displayNamePadding : styles.displayNameBackdrop }>
52
+            <View
53
+                style = { (this.props.contained ? styles.displayNamePadding : styles.displayNameBackdrop
54
+                    ) as ViewStyle }>
54 55
                 <Text
55 56
                     numberOfLines = { 1 }
56
-                    style = { styles.displayNameText }>
57
+                    style = { styles.displayNameText as TextStyle }>
57 58
                     { this.props._participantName }
58 59
                 </Text>
59 60
             </View>

react/features/display-name/components/native/DisplayNamePrompt.js → react/features/display-name/components/native/DisplayNamePrompt.tsx 查看文件

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import React from 'react';
4 2
 import { connect } from 'react-redux';
5 3
 
@@ -9,7 +7,7 @@ import AbstractDisplayNamePrompt from '../AbstractDisplayNamePrompt';
9 7
 /**
10 8
  * Implements a component to render a display name prompt.
11 9
  */
12
-class DisplayNamePrompt extends AbstractDisplayNamePrompt<*> {
10
+class DisplayNamePrompt extends AbstractDisplayNamePrompt<any> {
13 11
     /**
14 12
      * Implements React's {@link Component#render()}.
15 13
      *
@@ -23,8 +21,6 @@ class DisplayNamePrompt extends AbstractDisplayNamePrompt<*> {
23 21
                 titleKey = 'dialog.displayNameRequired' />
24 22
         );
25 23
     }
26
-
27
-    _onSetDisplayName: string => boolean;
28 24
 }
29 25
 
30 26
 export default connect()(DisplayNamePrompt);

react/features/display-name/components/native/styles.js → react/features/display-name/components/native/styles.ts 查看文件

@@ -1,5 +1,3 @@
1
-// @flow
2
-
3 1
 import BaseTheme from '../../../base/ui/components/BaseTheme.native';
4 2
 
5 3
 export default {

react/features/etherpad/components/SharedDocumentButton.native.js → react/features/etherpad/components/SharedDocumentButton.native.ts 查看文件

@@ -1,22 +1,18 @@
1
-// @flow
2
-
3 1
 import { connect } from 'react-redux';
4 2
 
5 3
 import { createToolbarEvent } from '../../analytics/AnalyticsEvents';
6 4
 import { sendAnalytics } from '../../analytics/functions';
5
+import { IReduxState } from '../../app/types';
7 6
 import { translate } from '../../base/i18n/functions';
8 7
 import { IconShareDoc } from '../../base/icons/svg';
9 8
 import AbstractButton, { IProps as AbstractButtonProps } from '../../base/toolbox/components/AbstractButton';
10 9
 import { navigate } from '../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
11 10
 import { screen } from '../../mobile/navigation/routes';
12 11
 
13
-
14
-type Props = AbstractButtonProps;
15
-
16 12
 /**
17 13
  * Implements an {@link AbstractButton} to open the chat screen on mobile.
18 14
  */
19
-class SharedDocumentButton extends AbstractButton<Props, *> {
15
+class SharedDocumentButton extends AbstractButton<AbstractButtonProps> {
20 16
     accessibilityLabel = 'toolbar.accessibilityLabel.document';
21 17
     icon = IconShareDoc;
22 18
     label = 'toolbar.documentOpen';
@@ -55,7 +51,7 @@ class SharedDocumentButton extends AbstractButton<Props, *> {
55 51
  * instance.
56 52
  * @returns {Object}
57 53
  */
58
-function _mapStateToProps(state: Object, ownProps: Object) {
54
+function _mapStateToProps(state: IReduxState, ownProps: any) {
59 55
     const { documentUrl } = state['features/etherpad'];
60 56
     const { visible = Boolean(documentUrl) } = ownProps;
61 57
 

react/features/etherpad/components/native/SharedDocument.js → react/features/etherpad/components/native/SharedDocument.tsx 查看文件

@@ -1,8 +1,10 @@
1 1
 import React, { PureComponent } from 'react';
2
-import { View } from 'react-native';
2
+import { WithTranslation } from 'react-i18next';
3
+import { View, ViewStyle } from 'react-native';
3 4
 import { WebView } from 'react-native-webview';
4 5
 import { connect } from 'react-redux';
5 6
 
7
+import { IReduxState } from '../../../app/types';
6 8
 import { translate } from '../../../base/i18n/functions';
7 9
 import JitsiScreen from '../../../base/modal/components/JitsiScreen';
8 10
 import LoadingIndicator from '../../../base/react/components/native/LoadingIndicator';
@@ -13,34 +15,29 @@ import styles, { INDICATOR_COLOR } from './styles';
13 15
 /**
14 16
  * The type of the React {@code Component} props of {@code ShareDocument}.
15 17
  */
16
-type Props = {
18
+interface IProps extends WithTranslation {
17 19
 
18 20
     /**
19 21
      * URL for the shared document.
20 22
      */
21
-    _documentUrl: string,
23
+    _documentUrl?: string;
22 24
 
23 25
     /**
24 26
      * Default prop for navigation between screen components(React Navigation).
25 27
      */
26
-    navigation: Object,
27
-
28
-    /**
29
-     * Function to be used to translate i18n labels.
30
-     */
31
-    t: Function
32
-};
28
+    navigation: Object;
29
+}
33 30
 
34 31
 /**
35 32
  * Implements a React native component that renders the shared document window.
36 33
  */
37
-class SharedDocument extends PureComponent<Props> {
34
+class SharedDocument extends PureComponent<IProps> {
38 35
     /**
39 36
      * Instantiates a new instance.
40 37
      *
41 38
      * @inheritdoc
42 39
      */
43
-    constructor(props: Props) {
40
+    constructor(props: IProps) {
44 41
         super(props);
45 42
 
46 43
         this._renderLoading = this._renderLoading.bind(this);
@@ -56,12 +53,11 @@ class SharedDocument extends PureComponent<Props> {
56 53
 
57 54
         return (
58 55
             <JitsiScreen
59
-                addHeaderHeightValue = { true }
60 56
                 style = { styles.sharedDocContainer }>
61 57
                 <WebView
62 58
                     hideKeyboardAccessoryView = { true }
63 59
                     renderLoading = { this._renderLoading }
64
-                    source = {{ uri: _documentUrl }}
60
+                    source = {{ uri: _documentUrl ?? '' }}
65 61
                     startInLoadingState = { true }
66 62
                     style = { styles.sharedDoc } />
67 63
             </JitsiScreen>
@@ -75,7 +71,7 @@ class SharedDocument extends PureComponent<Props> {
75 71
      */
76 72
     _renderLoading() {
77 73
         return (
78
-            <View style = { styles.indicatorWrapper }>
74
+            <View style = { styles.indicatorWrapper as ViewStyle }>
79 75
                 <LoadingIndicator
80 76
                     color = { INDICATOR_COLOR }
81 77
                     size = 'large' />
@@ -88,10 +84,11 @@ class SharedDocument extends PureComponent<Props> {
88 84
  * Maps (parts of) the redux state to {@link SharedDocument} React {@code Component} props.
89 85
  *
90 86
  * @param {Object} state - The redux store/state.
87
+ * @param {any} _ownProps - Component's props.
91 88
  * @private
92 89
  * @returns {Object}
93 90
  */
94
-export function _mapStateToProps(state: Object) {
91
+export function _mapStateToProps(state: IReduxState, _ownProps: any) {
95 92
     const documentUrl = getSharedDocumentUrl(state);
96 93
 
97 94
     return {

react/features/etherpad/components/native/styles.js → react/features/etherpad/components/native/styles.ts 查看文件

@@ -1,8 +1,5 @@
1
-// @flow
2
-
3 1
 import BaseTheme from '../../../base/ui/components/BaseTheme.native';
4 2
 
5
-
6 3
 export const INDICATOR_COLOR = BaseTheme.palette.ui07;
7 4
 
8 5
 export default {

react/features/feedback/actions.ts → react/features/feedback/actions.web.ts 查看文件

@@ -11,8 +11,8 @@ import {
11 11
     SUBMIT_FEEDBACK_ERROR,
12 12
     SUBMIT_FEEDBACK_SUCCESS
13 13
 } from './actionTypes';
14
-import FeedbackDialog from './components/FeedbackDialog';
15
-import { sendFeedbackToJaaSRequest } from './functions';
14
+import FeedbackDialog from './components/FeedbackDialog.web';
15
+import { sendFeedbackToJaaSRequest } from './functions.web';
16 16
 
17 17
 /**
18 18
  * Caches the passed in feedback in the redux store.

react/features/device-selection/components/DeviceSelector.native.js → react/features/feedback/components/FeedbackButton.native.ts 查看文件


+ 0
- 0
react/features/feedback/components/FeedbackDialog.native.js 查看文件


react/features/feedback/components/FeedbackButton.native.js → react/features/feedback/components/FeedbackDialog.native.ts 查看文件


+ 1
- 1
react/features/feedback/components/FeedbackDialog.web.tsx 查看文件

@@ -15,7 +15,7 @@ import { IconFavorite, IconFavoriteSolid } from '../../base/icons/svg';
15 15
 import { withPixelLineHeight } from '../../base/styles/functions.web';
16 16
 import Dialog from '../../base/ui/components/web/Dialog';
17 17
 import Input from '../../base/ui/components/web/Input';
18
-import { cancelFeedback, submitFeedback } from '../actions';
18
+import { cancelFeedback, submitFeedback } from '../actions.web';
19 19
 
20 20
 const styles = (theme: Theme) => {
21 21
     return {

react/features/feedback/functions.ts → react/features/feedback/functions.web.ts 查看文件


react/features/old-client-notification/components/OldElectronAPPNotificationDescription.js → react/features/old-client-notification/components/OldElectronAPPNotificationDescription.tsx 查看文件

@@ -1,26 +1,14 @@
1
-// @flow
2
-
3 1
 import React, { Component } from 'react';
2
+import { WithTranslation } from 'react-i18next';
4 3
 
5 4
 import { translate } from '../../base/i18n/functions';
6 5
 
7
-/**
8
- * The type of the React {@code Component} props of {@link OldElectronAPPNotificationDescription}.
9
- */
10
-type Props = {
11
-
12
-    /**
13
-     * Invoked to obtain translated strings.
14
-     */
15
-    t: Function
16
-};
17
-
18 6
 /**
19 7
  * A component that renders the description of the notification for old Jitsi Meet Electron clients.
20 8
  *
21 9
  * @augments AbstractApp
22 10
  */
23
-export class OldElectronAPPNotificationDescription extends Component<Props> {
11
+export class OldElectronAPPNotificationDescription extends Component<WithTranslation> {
24 12
     /**
25 13
      * Implements React's {@link Component#render()}.
26 14
      *

+ 1
- 0
react/features/settings/components/native/SettingsView.tsx 查看文件

@@ -286,6 +286,7 @@ class SettingsView extends Component<IProps, IState> {
286 286
         return (
287 287
             <JitsiScreen
288 288
                 disableForcedKeyboardDismiss = { true }
289
+                // @ts-ignore
289 290
                 safeAreaInsets = { [ addBottomInset && 'bottom', 'left', 'right' ].filter(Boolean) }
290 291
                 style = { styles.settingsViewContainer }>
291 292
                 <ScrollView bounces = { scrollBounces }>

+ 21
- 17
react/features/shared-video/components/native/AbstractVideoManager.ts 查看文件

@@ -1,7 +1,7 @@
1 1
 import throttle from 'lodash/throttle';
2 2
 import { PureComponent } from 'react';
3 3
 
4
-import { IReduxState } from '../../../app/types';
4
+import { IReduxState, IStore } from '../../../app/types';
5 5
 import { getCurrentConference } from '../../../base/conference/functions';
6 6
 import { IJitsiConference } from '../../../base/conference/reducer';
7 7
 import { getLocalParticipant } from '../../../base/participants/functions';
@@ -28,7 +28,7 @@ export interface IProps {
28 28
     /**
29 29
      * The current conference.
30 30
      */
31
-    _conference: IJitsiConference;
31
+    _conference?: IJitsiConference;
32 32
 
33 33
     /**
34 34
      * Is the video shared by the local user.
@@ -40,12 +40,12 @@ export interface IProps {
40 40
     /**
41 41
      * The shared video owner id.
42 42
      */
43
-    _ownerId: string;
43
+    _ownerId?: string;
44 44
 
45 45
     /**
46 46
      * The shared video status.
47 47
      */
48
-    _status: string;
48
+    _status?: string;
49 49
 
50 50
     /**
51 51
      * Seek time in seconds.
@@ -56,12 +56,12 @@ export interface IProps {
56 56
     /**
57 57
      * The video url.
58 58
      */
59
-    _videoUrl: string;
59
+    _videoUrl?: string;
60 60
 
61 61
     /**
62 62
      * The Redux dispatch function.
63 63
      */
64
-    dispatch: Function;
64
+    dispatch: IStore['dispatch'];
65 65
 
66 66
     /**
67 67
       * The player's height.
@@ -82,7 +82,7 @@ export interface IProps {
82 82
 /**
83 83
  * Manager of shared video.
84 84
  */
85
-class AbstractVideoManager extends PureComponent<IProps> {
85
+abstract class AbstractVideoManager<S=void> extends PureComponent<IProps, S> {
86 86
     throttledFireUpdateSharedVideoEvent: Function;
87 87
 
88 88
     /**
@@ -198,7 +198,7 @@ class AbstractVideoManager extends PureComponent<IProps> {
198 198
         } = this.props;
199 199
 
200 200
         dispatch(setSharedVideoStatus({
201
-            videoUrl: _videoUrl,
201
+            videoUrl: _videoUrl ?? '',
202 202
             status,
203 203
             time,
204 204
             ownerId: _ownerId
@@ -207,35 +207,39 @@ class AbstractVideoManager extends PureComponent<IProps> {
207 207
 
208 208
     /**
209 209
      * Seeks video to provided time.
210
-     *
211
-     * @param {number} time
212 210
      */
213
-    seek: (time: number) => void;
211
+    abstract seek(time: number): void;
214 212
 
215 213
     /**
216 214
      * Indicates the playback state of the video.
217 215
      */
218
-    getPlaybackStatus: () => string;
216
+    abstract getPlaybackStatus(): string;
219 217
 
220 218
     /**
221 219
      * Plays video.
222 220
      */
223
-    play: () => void;
221
+    abstract play(): void;
224 222
 
225 223
     /**
226 224
      * Pauses video.
225
+     *
226
+     * @returns {void}
227 227
      */
228
-    pause: () => void;
228
+    abstract pause(): void;
229 229
 
230 230
     /**
231 231
      * Retrieves current time.
232 232
      */
233
-    getTime: () => number;
233
+    abstract getTime(): number;
234 234
 
235 235
     /**
236 236
      * Disposes current video player.
237
+     *
238
+     * @returns {void}
237 239
      */
238
-    dispose: () => void;
240
+    dispose() {
241
+        // optional abstract method to be implemented by sub-class
242
+    }
239 243
 }
240 244
 
241 245
 
@@ -256,7 +260,7 @@ export function _mapStateToProps(state: IReduxState) {
256 260
         _isOwner: ownerId === localParticipant?.id,
257 261
         _ownerId: ownerId,
258 262
         _status: status,
259
-        _time: time,
263
+        _time: Number(time),
260 264
         _videoUrl: videoUrl
261 265
     };
262 266
 }

react/features/shared-video/components/native/SharedVideo.js → react/features/shared-video/components/native/SharedVideo.tsx 查看文件

@@ -1,9 +1,8 @@
1
-// @flow
2
-
3 1
 import React, { Component } from 'react';
4
-import { View } from 'react-native';
2
+import { View, ViewStyle } from 'react-native';
5 3
 import { connect } from 'react-redux';
6 4
 
5
+import { IReduxState, IStore } from '../../../app/types';
7 6
 import { getLocalParticipant } from '../../../base/participants/functions';
8 7
 import { ASPECT_RATIO_WIDE } from '../../../base/responsive-ui/constants';
9 8
 import { setToolboxVisible } from '../../../toolbox/actions';
@@ -12,41 +11,41 @@ import VideoManager from './VideoManager';
12 11
 import YoutubeVideoManager from './YoutubeVideoManager';
13 12
 import styles from './styles';
14 13
 
15
-type Props = {
14
+interface IProps {
16 15
 
17 16
     /**
18 17
      * The Redux dispatch function.
19 18
      */
20
-     dispatch: Function,
19
+    dispatch: IStore['dispatch'];
21 20
 
22 21
     /**
23 22
      * Is the video shared by the local user.
24 23
      *
25 24
      * @private
26 25
      */
27
-    isOwner: boolean,
26
+    isOwner: boolean;
28 27
 
29 28
     /**
30 29
      * True if in landscape mode.
31 30
      *
32 31
      * @private
33 32
      */
34
-     isWideScreen: boolean,
33
+    isWideScreen: boolean;
35 34
 
36 35
     /**
37 36
      * The available player width.
38 37
      */
39
-    playerHeight: number,
38
+    playerHeight: number;
40 39
 
41 40
     /**
42 41
      * The available player width.
43 42
      */
44
-    playerWidth: number,
43
+    playerWidth: number;
45 44
 
46 45
     /**
47 46
      * The shared video url.
48 47
      */
49
-     videoUrl: string,
48
+    videoUrl?: string;
50 49
 }
51 50
 
52 51
 /** .
@@ -55,13 +54,13 @@ type Props = {
55 54
  *
56 55
  * @augments Component
57 56
  */
58
-class SharedVideo extends Component<Props> {
57
+class SharedVideo extends Component<IProps> {
59 58
     /**
60 59
      * Initializes a new {@code SharedVideo} instance.
61 60
      *
62 61
      * @param {Object} props - The properties.
63 62
      */
64
-    constructor(props: Props) {
63
+    constructor(props: IProps) {
65 64
         super(props);
66 65
 
67 66
         this.setWideScreenMode(props.isWideScreen);
@@ -73,7 +72,7 @@ class SharedVideo extends Component<Props> {
73 72
      * @inheritdoc
74 73
      * @returns {void}
75 74
      */
76
-    componentDidUpdate(prevProps: Props) {
75
+    componentDidUpdate(prevProps: IProps) {
77 76
         const { isWideScreen } = this.props;
78 77
 
79 78
         if (isWideScreen !== prevProps.isWideScreen) {
@@ -88,7 +87,7 @@ class SharedVideo extends Component<Props> {
88 87
      * @private
89 88
      * @returns {void}
90 89
     */
91
-    setWideScreenMode(isWideScreen) {
90
+    setWideScreenMode(isWideScreen: boolean) {
92 91
         this.props.dispatch(setToolboxVisible(!isWideScreen));
93 92
     }
94 93
 
@@ -113,7 +112,7 @@ class SharedVideo extends Component<Props> {
113 112
         return (
114 113
             <View
115 114
                 pointerEvents = { isOwner ? 'auto' : 'none' }
116
-                style = { styles.videoContainer } >
115
+                style = { styles.videoContainer as ViewStyle } >
117 116
                 {videoUrl.match(/http/)
118 117
                     ? (
119 118
                         <VideoManager
@@ -137,9 +136,9 @@ class SharedVideo extends Component<Props> {
137 136
  *
138 137
  * @param {Object} state - The Redux state.
139 138
  * @private
140
- * @returns {Props}
139
+ * @returns {IProps}
141 140
  */
142
-function _mapStateToProps(state) {
141
+function _mapStateToProps(state: IReduxState) {
143 142
     const { ownerId, videoUrl } = state['features/shared-video'];
144 143
     const { aspectRatio, clientHeight, clientWidth } = state['features/base/responsive-ui'];
145 144
 
@@ -157,7 +156,7 @@ function _mapStateToProps(state) {
157 156
     }
158 157
 
159 158
     return {
160
-        isOwner: ownerId === localParticipant.id,
159
+        isOwner: ownerId === localParticipant?.id,
161 160
         isWideScreen,
162 161
         playerHeight,
163 162
         playerWidth,

react/features/shared-video/components/native/VideoManager.js → react/features/shared-video/components/native/VideoManager.tsx 查看文件

@@ -1,21 +1,30 @@
1
+// @ts-expect-error
1 2
 import Logger from '@jitsi/logger';
2
-import React from 'react';
3
+import React, { RefObject } from 'react';
3 4
 import Video from 'react-native-video';
4 5
 import { connect } from 'react-redux';
5 6
 
6 7
 import { PLAYBACK_STATUSES } from '../../constants';
7 8
 
8 9
 import AbstractVideoManager, {
9
-    Props,
10
+    IProps,
10 11
     _mapStateToProps
11 12
 } from './AbstractVideoManager';
12 13
 
14
+// @ts-ignore
13 15
 const logger = Logger.getLogger(__filename);
14 16
 
17
+interface IState {
18
+    currentTime: number;
19
+    paused: boolean;
20
+}
21
+
15 22
 /**
16 23
  * Manager of shared video.
17 24
  */
18
-class VideoManager extends AbstractVideoManager<Props> {
25
+class VideoManager extends AbstractVideoManager<IState> {
26
+    playerRef: RefObject<Video>;
27
+
19 28
     /**
20 29
      * Initializes a new VideoManager instance.
21 30
      *
@@ -23,7 +32,7 @@ class VideoManager extends AbstractVideoManager<Props> {
23 32
      *
24 33
      * @returns {void}
25 34
      */
26
-    constructor(props) {
35
+    constructor(props: IProps) {
27 36
         super(props);
28 37
 
29 38
         this.state = {
@@ -76,7 +85,7 @@ class VideoManager extends AbstractVideoManager<Props> {
76 85
      *
77 86
      * @returns {void}
78 87
      */
79
-    seek(time) {
88
+    seek(time: number) {
80 89
         if (this.player) {
81 90
             this.player.seek(time);
82 91
         }
@@ -110,7 +119,7 @@ class VideoManager extends AbstractVideoManager<Props> {
110 119
      * @param {Object} options.playbackRate - Playback rate: 1 - playing, 0 - paused, other - slowed down / sped up.
111 120
      * @returns {void}
112 121
      */
113
-    onPlaybackRateChange({ playbackRate }) {
122
+    onPlaybackRateChange({ playbackRate }: { playbackRate: number; }) {
114 123
         if (playbackRate === 0) {
115 124
             this.setState({
116 125
                 paused: true
@@ -129,12 +138,12 @@ class VideoManager extends AbstractVideoManager<Props> {
129 138
     }
130 139
 
131 140
     /**
132
-     * Handles progress updarte event.
141
+     * Handles progress update event.
133 142
      *
134 143
      * @param {Object} options - Progress event options.
135 144
      * @returns {void}
136 145
      */
137
-    onProgress(options) {
146
+    onProgress(options: { currentTime: number; }) {
138 147
         this.setState({ currentTime: options.currentTime });
139 148
         this.throttledFireUpdateSharedVideoEvent();
140 149
     }
@@ -148,10 +157,10 @@ class VideoManager extends AbstractVideoManager<Props> {
148 157
         const { _isOwner, videoId, width, height } = this.props;
149 158
         const { paused } = this.state;
150 159
 
151
-        const options = {
160
+        const options: any = {
152 161
             paused,
153 162
             progressUpdateInterval: 5000,
154
-            resizeMode: 'cover',
163
+            resizeMode: 'cover' as const,
155 164
             style: {
156 165
                 height,
157 166
                 width
@@ -160,7 +169,7 @@ class VideoManager extends AbstractVideoManager<Props> {
160 169
             controls: _isOwner,
161 170
             pictureInPicture: false,
162 171
             onProgress: this.onProgress,
163
-            onError: event => {
172
+            onError: (event: Error) => {
164 173
                 logger.error('Error in the player:', event);
165 174
             }
166 175
         };

react/features/shared-video/components/native/YoutubeVideoManager.js → react/features/shared-video/components/native/YoutubeVideoManager.tsx 查看文件

@@ -1,11 +1,11 @@
1
-import React from 'react';
1
+import React, { RefObject } from 'react';
2 2
 import Video from 'react-native-youtube-iframe';
3 3
 import { connect } from 'react-redux';
4 4
 
5 5
 import { PLAYBACK_STATUSES } from '../../constants';
6 6
 
7 7
 import AbstractVideoManager, {
8
-    Props,
8
+    IProps,
9 9
     _mapStateToProps
10 10
 } from './AbstractVideoManager';
11 11
 
@@ -16,10 +16,16 @@ import AbstractVideoManager, {
16 16
  */
17 17
 const webviewUserAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'; // eslint-disable-line max-len
18 18
 
19
+interface IState {
20
+    paused: boolean;
21
+}
22
+
19 23
 /**
20 24
  * Manager of youtube shared video.
21 25
  */
22
-class YoutubeVideoManager extends AbstractVideoManager<Props> {
26
+class YoutubeVideoManager extends AbstractVideoManager<IState> {
27
+    playerRef: RefObject<typeof Video>;
28
+
23 29
     /**
24 30
      * Initializes a new VideoManager instance.
25 31
      *
@@ -27,7 +33,7 @@ class YoutubeVideoManager extends AbstractVideoManager<Props> {
27 33
      *
28 34
      * @returns {void}
29 35
      */
30
-    constructor(props) {
36
+    constructor(props: IProps) {
31 37
         super(props);
32 38
 
33 39
         this.state = {
@@ -69,6 +75,7 @@ class YoutubeVideoManager extends AbstractVideoManager<Props> {
69 75
      * @returns {number}
70 76
      */
71 77
     getTime() {
78
+        // @ts-ignore
72 79
         return this.player?.getCurrentTime();
73 80
     }
74 81
 
@@ -79,8 +86,9 @@ class YoutubeVideoManager extends AbstractVideoManager<Props> {
79 86
      *
80 87
      * @returns {void}
81 88
      */
82
-    seek(time) {
89
+    seek(time: number) {
83 90
         if (this.player) {
91
+            // @ts-ignore
84 92
             this.player.seekTo(time);
85 93
         }
86 94
     }
@@ -113,7 +121,7 @@ class YoutubeVideoManager extends AbstractVideoManager<Props> {
113 121
      * @param {string} event - State event.
114 122
      * @returns {void}
115 123
      */
116
-    _onChangeState(event) {
124
+    _onChangeState(event: string) {
117 125
         if (event === 'paused') {
118 126
             this.setState({
119 127
                 paused: true
@@ -150,7 +158,7 @@ class YoutubeVideoManager extends AbstractVideoManager<Props> {
150 158
     getPlayerOptions() {
151 159
         const { _isOwner, videoId, width, height } = this.props;
152 160
 
153
-        const options = {
161
+        const options: any = {
154 162
             height,
155 163
             initialPlayerParams: {
156 164
                 controls: _isOwner,

react/features/shared-video/components/native/styles.js → react/features/shared-video/components/native/styles.ts 查看文件


react/features/unsupported-browser/components/JaasUnsupportedDesktopBrowser.js → react/features/unsupported-browser/components/JaasUnsupportedDesktopBrowser.ts 查看文件


react/features/unsupported-browser/components/PageSelector.js → react/features/unsupported-browser/components/PageSelector.tsx 查看文件


react/features/unsupported-browser/components/browserLinks.js → react/features/unsupported-browser/components/browserLinks.ts 查看文件

@@ -1,5 +1,3 @@
1
-/* @flow */
2
-
3 1
 /**
4 2
  * The URL at which Google Chrome is available for download.
5 3
  *

+ 0
- 1
tsconfig.native.json 查看文件

@@ -24,7 +24,6 @@
24 24
         "react/features/e2ee",
25 25
         "react/features/embed-meeting",
26 26
         "react/features/face-landmarks",
27
-        "react/features/feedback",
28 27
         "react/features/no-audio-signal",
29 28
         "react/features/noise-suppression",
30 29
         "react/features/old-client-notification",

正在加载...
取消
保存