Lyubomir Marinov 8 年之前
父節點
當前提交
0d97f14a1a
共有 2 個文件被更改,包括 15 次插入7 次删除
  1. 3
    1
      react/features/base/lib-jitsi-meet/_.web.js
  2. 12
    6
      react/features/base/lib-jitsi-meet/actions.js

+ 3
- 1
react/features/base/lib-jitsi-meet/_.web.js 查看文件

1
-/* global JitsiMeetJS */
1
+/* @flow */
2
+
3
+declare var JitsiMeetJS: Object;
2
 
4
 
3
 export default JitsiMeetJS;
5
 export default JitsiMeetJS;

+ 12
- 6
react/features/base/lib-jitsi-meet/actions.js 查看文件

1
+/* @flow */
2
+
3
+import type { Dispatch } from 'redux';
4
+
1
 import JitsiMeetJS from './';
5
 import JitsiMeetJS from './';
2
 import {
6
 import {
3
     LIB_DISPOSED,
7
     LIB_DISPOSED,
6
     SET_CONFIG
10
     SET_CONFIG
7
 } from './actionTypes';
11
 } from './actionTypes';
8
 
12
 
13
+declare var APP: Object;
14
+
9
 /**
15
 /**
10
  * Disposes lib-jitsi-meet.
16
  * Disposes lib-jitsi-meet.
11
  *
17
  *
18
     // there is a big chance it will be async.
24
     // there is a big chance it will be async.
19
     // TODO Currently, lib-jitsi-meet doesn't have any functionality to
25
     // TODO Currently, lib-jitsi-meet doesn't have any functionality to
20
     // dispose itself.
26
     // dispose itself.
21
-    return dispatch => {
27
+    return (dispatch: Dispatch<*>) => {
22
         dispatch({ type: LIB_DISPOSED });
28
         dispatch({ type: LIB_DISPOSED });
23
 
29
 
24
         return Promise.resolve();
30
         return Promise.resolve();
31
  * @returns {Function}
37
  * @returns {Function}
32
  */
38
  */
33
 export function initLib() {
39
 export function initLib() {
34
-    return (dispatch, getState) => {
40
+    return (dispatch: Dispatch<*>, getState: Function) => {
35
         const config = getState()['features/base/lib-jitsi-meet'].config;
41
         const config = getState()['features/base/lib-jitsi-meet'].config;
36
 
42
 
37
         if (!config) {
43
         if (!config) {
65
  * @param {Object} config - Config object accepted by JitsiMeetJS#init()
71
  * @param {Object} config - Config object accepted by JitsiMeetJS#init()
66
  * method.
72
  * method.
67
  * @returns {{
73
  * @returns {{
68
- *      type: SET_CONFIG,
69
- *      config: Object
70
- *  }}
74
+ *     type: SET_CONFIG,
75
+ *     config: Object
76
+ * }}
71
  */
77
  */
72
-export function setConfig(config) {
78
+export function setConfig(config: Object) {
73
     return {
79
     return {
74
         type: SET_CONFIG,
80
         type: SET_CONFIG,
75
         config
81
         config

Loading…
取消
儲存