Bläddra i källkod

fix(types): fix last few types (#2417)

release-8443
Daniel McAssey 1 år sedan
förälder
incheckning
47fc0fbbbe
Inget konto är kopplat till bidragsgivarens mejladress

+ 1
- 1
JitsiParticipant.js Visa fil

@@ -135,7 +135,7 @@ export default class JitsiParticipant {
135 135
 
136 136
     /**
137 137
      * Returns a set with the features for the participant.
138
-     * @returns {Promise<Set<String>, Error>}
138
+     * @returns {Promise<Set<String>>}
139 139
      */
140 140
     getFeatures() {
141 141
         return Promise.resolve(this._features);

+ 1
- 0
authenticateAndUpgradeRole.js Visa fil

@@ -40,6 +40,7 @@ import XMPP from './modules/xmpp/xmpp';
40 40
  * @param {string} options.id - XMPP user's ID to log in. For example,
41 41
  * user@xmpp-server.com.
42 42
  * @param {string} options.password - XMPP user's password to log in with.
43
+ * @param {Function} [options.onCreateResource]
43 44
  * @param {Function} [options.onLoginSuccessful] - Callback called when logging
44 45
  * into the XMPP server was successful. The next step will be to obtain a new
45 46
  * session ID from Jicofo and join the MUC using it which will effectively

+ 2
- 1
modules/RTC/JitsiLocalTrack.js Visa fil

@@ -47,8 +47,9 @@ export default class JitsiLocalTrack extends JitsiTrack {
47 47
      * @param {number} trackInfo.resolution - The the video resolution if it's a video track
48 48
      * @param {string} trackInfo.deviceId - The ID of the local device for this track.
49 49
      * @param {string} trackInfo.facingMode - Thehe camera facing mode used in getUserMedia call (for mobile only).
50
-     * @param {sourceId} trackInfo.sourceId - The id of the desktop sharing source, which is the Chrome media source ID,
50
+     * @param {string} trackInfo.sourceId - The id of the desktop sharing source, which is the Chrome media source ID,
51 51
      * returned by Desktop Picker on Electron. NOTE: defined for desktop sharing tracks only.
52
+     * @param {string} trackInfo.sourceType - The type of source the track originates from.
52 53
      */
53 54
     constructor({
54 55
         deviceId,

+ 6
- 8
modules/connectivity/TrackStreamingStatus.ts Visa fil

@@ -4,12 +4,11 @@ import { JitsiConferenceEvents } from '../../JitsiConferenceEvents';
4 4
 import * as JitsiTrackEvents from '../../JitsiTrackEvents';
5 5
 import RTCEvents from '../../service/RTC/RTCEvents';
6 6
 import { createTrackStreamingStatusEvent } from '../../service/statistics/AnalyticsEvents';
7
-import JitsiConference from '../../types/hand-crafted/JitsiConference';
8
-import JitsiRemoteTrack from '../../types/hand-crafted/modules/RTC/JitsiRemoteTrack';
9
-import RTC from '../../types/hand-crafted/modules/RTC/RTC';
10
-import { VideoType } from '../../types/hand-crafted/service/RTC/VideoType';
11 7
 import browser from '../browser';
12 8
 import Statistics from '../statistics/statistics';
9
+import JitsiRemoteTrack from '../RTC/JitsiRemoteTrack';
10
+import { VideoType } from '../../service/RTC/VideoType';
11
+import RTC from '../RTC/RTC';
13 12
 
14 13
 /** Track streaming statuses. */
15 14
 export enum TrackStreamingStatus {
@@ -38,7 +37,6 @@ export enum TrackStreamingStatus {
38 37
   }
39 38
 
40 39
 type StreamingStatusMap = {
41
-    // TODO: Replace this hand crafted VideoType when we convert VideoType.js to Typescript.
42 40
     videoType?: VideoType,
43 41
     startedMs?: number,
44 42
     p2p?: boolean,
@@ -75,7 +73,7 @@ const DEFAULT_RESTORING_TIMEOUT = 10000;
75 73
  */
76 74
 export class TrackStreamingStatusImpl {
77 75
     rtc: RTC;
78
-    conference: JitsiConference;
76
+    conference: any; // TODO: needs JitsiConference type
79 77
     track: JitsiRemoteTrack;
80 78
 
81 79
     /**  This holds the timeout callback ID scheduled using window.setTimeout. */
@@ -207,7 +205,7 @@ export class TrackStreamingStatusImpl {
207 205
      *
208 206
      * @constructor
209 207
      * @param rtc - the RTC service instance
210
-     * @param conference - parent conference instance
208
+     * @param conference - parent conference instance // TODO: Needs JitsiConference Type
211 209
      * @param {Object} options
212 210
      * @param {number} [options.p2pRtcMuteTimeout=2500] custom value for
213 211
      * {@link TrackStreamingStatusImpl.p2pRtcMuteTimeout}.
@@ -216,7 +214,7 @@ export class TrackStreamingStatusImpl {
216 214
      * @param {number} [options.outOfForwardedSourcesTimeout=500] custom value for
217 215
      * {@link TrackStreamingStatusImpl.outOfForwardedSourcesTimeout}.
218 216
      */
219
-    constructor(rtc: RTC, conference: JitsiConference, track: JitsiRemoteTrack, options: {
217
+    constructor(rtc: RTC, conference: any, track: JitsiRemoteTrack, options: {
220 218
         outOfForwardedSourcesTimeout: number,
221 219
         p2pRtcMuteTimeout: number,
222 220
         rtcMuteTimeout: number

+ 1
- 2
modules/recording/JibriSession.js Visa fil

@@ -235,8 +235,7 @@ export default class JibriSession {
235 235
     /**
236 236
      * Generates the message to change the status of the recording session.
237 237
      *
238
-     * @param {string} status - The new status to which the recording session
239
-     * should transition.
238
+     * @param {string} [options.action] - The action to set the IQ
240 239
      * @param {string} [options.appData] - Data specific to the app/service that
241 240
      * the result file will be uploaded.
242 241
      * @param {string} [options.broadcastId] - The broadcast ID of an

+ 2
- 1
modules/statistics/AudioOutputProblemDetector.js Visa fil

@@ -43,7 +43,8 @@ export default class AudioOutputProblemDetector {
43 43
      * A listener for audio level data received by a remote participant.
44 44
      *
45 45
      * @param {string} userID - The user id of the participant that sent the data.
46
-     * @param {number} audioLevel - The average audio level value.
46
+     * @param {Object} result - The result object.
47
+     * @param {number} [result.avgAudioLevels] - The average audio level value.
47 48
      * @returns {void}
48 49
      */
49 50
     _onRemoteAudioLevelReceived(userID, { avgAudioLevels }) {

+ 1
- 1
modules/xmpp/Caps.js Visa fil

@@ -195,7 +195,7 @@ export default class Caps extends Listenable {
195 195
      * Returns a set with the features for a host.
196 196
      * @param {String} jid the jid of the host
197 197
      * @param {int} timeout the timeout in ms for reply from the host.
198
-     * @returns {Promise<Set<String>, Error>}
198
+     * @returns {Promise<Set<String>>}
199 199
      */
200 200
     getFeaturesAndIdentities(jid, node, timeout = 5000) {
201 201
         return this._getDiscoInfo(jid, node, timeout);

+ 4
- 2
modules/xmpp/XmppConnection.js Visa fil

@@ -528,8 +528,10 @@ export default class XmppConnection extends Listenable {
528 528
      * which would fail immediately if disconnected).
529 529
      *
530 530
      * @param {Element} iq - The IQ to send.
531
-     * @param {number} timeout - How long to wait for the response. The time when the connection is reconnecting is
532
-     * included, which means that the IQ may never be sent and still fail with a timeout.
531
+     * @param {Object} options - Options object
532
+     * @param {options.timeout} timeout - How long to wait for the response.
533
+     * The time when the connection is reconnecting is included, which means that
534
+     * the IQ may never be sent and still fail with a timeout.
533 535
      */
534 536
     sendIQ2(iq, { timeout }) {
535 537
         return new Promise((resolve, reject) => {

+ 1
- 1
modules/xmpp/strophe.ping.js Visa fil

@@ -34,7 +34,7 @@ export default class PingConnectionPlugin extends ConnectionPlugin {
34 34
      * @param {Object} options
35 35
      * @param {Function} options.onPingThresholdExceeded - Callback called when ping fails too many times (controlled
36 36
      * by the {@link PING_THRESHOLD} constant).
37
-     * @param {Function} options._getTimeSinceLastServerResponse - A function to obtain the last seen
37
+     * @param {Function} options.getTimeSinceLastServerResponse - A function to obtain the last seen
38 38
      * response from the server.
39 39
      * @param {Object} options.pingOptions - The ping options if any.
40 40
      * @constructor

Laddar…
Avbryt
Spara