@@ -522,7 +522,7 @@ export class StreamApi extends BaseApi {
522522 * @param {number } [listener.streamId] optional remote Stream ID to filter events (omit for all streams)
523523 * @param {(event: RTCTrackEvent) => void } listener.onRemoteStreamTrack callback invoked for incoming remote tracks
524524 */
525- addRemoteStreamListener ( listener : RemoteStreamListener ) {
525+ addRemoteStreamListener ( listener : RemoteStreamListener ) : void {
526526 this . client . addRemoteStreamListener ( listener ) ;
527527 }
528528
@@ -549,6 +549,7 @@ export class StreamApi extends BaseApi {
549549 * @param {EventType } eventType type of event which you listen for
550550 * @param {EventSelectorType } selectorType scope on which you listen for events
551551 * @param {string } selectorId ID of the selector
552+ * @returns {string } subscription ID
552553 */
553554 async buildSubscriptionQuery (
554555 eventType : StreamEventType ,
@@ -567,7 +568,7 @@ export class StreamApi extends BaseApi {
567568 *
568569 * @param {(stats: AudioLevelsStats) => void } onStats callback invoked with current audio levels stats
569570 */
570- async addAudioLevelStatsListener ( onStats : ( stats : AudioLevelsStats ) => void ) {
571+ async addAudioLevelStatsListener ( onStats : ( stats : AudioLevelsStats ) => void ) : Promise < void > {
571572 if ( onStats && typeof onStats === "function" ) {
572573 this . client . setAudioLevelCallback ( onStats ) ;
573574 }
@@ -580,7 +581,7 @@ export class StreamApi extends BaseApi {
580581 * @param {Uint8Array } data bytes to send to remote participants
581582 * @throws {Error } when there is no DataTrack (or DataChannel) for the given `streamTrackId`
582583 */
583- async sendData ( streamTrackId : Types . StreamTrackId , data : Uint8Array ) {
584+ async sendData ( streamTrackId : Types . StreamTrackId , data : Uint8Array ) : Promise < void > {
584585 const dataChannel = this . streamTracks . get ( streamTrackId ) ?. dataChannelMeta . dataChannel ;
585586 if ( ! dataChannel ) {
586587 throw new Error ( `There is no DataTrack with given streamTrackId: ${ streamTrackId } ` ) ;
0 commit comments