Skip to content

Commit

Permalink
chore. add returns annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrixbirds committed Aug 23, 2019
1 parent 4ab1210 commit e41f146
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
12 changes: 6 additions & 6 deletions lib/RtcEngine.native.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ declare class RtcEngine {
* It will occurs two events:
* Occurs leaveChannel when achieve leaving stage
* Occurs joinChannelSuccess when achieve joining stage
* @param channelName
* @param token
* @param channelName {@link string}
* @param token {@link string}
*/
static switchChannel(channelName: string, token?: string): Promise<any>;
/**
Expand All @@ -53,7 +53,7 @@ declare class RtcEngine {
* It will occurs event:
* Occurs mediaRelayStateChanged
* Occurs receivedChannelMediaRelay when peer channel received this message
* @param config
* @param config {@link ChannelMediaConfiguration}
*/
static startChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
/**
Expand All @@ -62,7 +62,7 @@ declare class RtcEngine {
* This method will remove & update relay media stream across specified channels. (maximum support relay 4 channels)
* It will occurs event:
* Occurs mediaRelayStateChanged
* @param config
* @param config {@link ChannelMediaConfiguration}
*/
static removeChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
/**
Expand All @@ -71,7 +71,7 @@ declare class RtcEngine {
* This method will update relay media stream across specified channels. (maximum support 4 channels)
* It will occurs event:
* Occurs mediaRelayStateChanged
* @param config
* @param config {@link ChannelMediaConfiguration}
*/
static updateChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any>;
/**
Expand All @@ -80,7 +80,7 @@ declare class RtcEngine {
* This method will stop relay media stream across specified channels.
* It will occurs event:
* Occurs mediaRelayStateChanged
* @param config
* @param config {@link ChannelMediaConfiguration}
*/
static stopChannelMediaRelay(): Promise<any>;
/**
Expand Down
12 changes: 6 additions & 6 deletions lib/RtcEngine.native.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions src/RtcEngine.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class RtcEngine {
* This method creates and start event observer. You should call this method once.
* @example `RtcEngine.init(option)`
* @param options Defines the property of the client, see {@link Option} for details.
* @returns any
*/
public static init(options: Option): void {
Agora.init(options);
Expand All @@ -72,6 +73,7 @@ class RtcEngine {
* @param uid
* @param token
* @param info
* @returns Promise<any>
*/
public static joinChannel(channelName: string, uid?: number, token?: string, info?: Object): Promise<any> {
return Agora.joinChannel({channelName, uid, token, info});
Expand All @@ -85,8 +87,9 @@ class RtcEngine {
* It will occurs two events:
* Occurs leaveChannel when achieve leaving stage
* Occurs joinChannelSuccess when achieve joining stage
* @param channelName
* @param token
* @param channelName {@link string}
* @param token {@link string}
* @returns Promise<any>
*/
public static switchChannel(channelName: string, token?: string): Promise<any> {
return Agora.switchChannel({channelName, token});
Expand All @@ -99,7 +102,8 @@ class RtcEngine {
* It will occurs event:
* Occurs mediaRelayStateChanged
* Occurs receivedChannelMediaRelay when peer channel received this message
* @param config
* @param config {@link ChannelMediaConfiguration}
* @returns Promise<any>
*/
public static startChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any> {
return Agora.startChannelMediaRelay(config);
Expand All @@ -111,7 +115,8 @@ class RtcEngine {
* This method will remove & update relay media stream across specified channels. (maximum support relay 4 channels)
* It will occurs event:
* Occurs mediaRelayStateChanged
* @param config
* @param config {@link ChannelMediaConfiguration}
* @returns Promise<any>
*/
public static removeChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any> {
return Agora.removeChannelMediaRelay(config);
Expand All @@ -123,7 +128,8 @@ class RtcEngine {
* This method will update relay media stream across specified channels. (maximum support 4 channels)
* It will occurs event:
* Occurs mediaRelayStateChanged
* @param config
* @param config {@link ChannelMediaConfiguration}
* @returns Promise<any>
*/
public static updateChannelMediaRelay(config: ChannelMediaConfiguration): Promise<any> {
return Agora.updateChannelMediaRelay(config);
Expand All @@ -135,7 +141,8 @@ class RtcEngine {
* This method will stop relay media stream across specified channels.
* It will occurs event:
* Occurs mediaRelayStateChanged
* @param config
* @param config {@link ChannelMediaConfiguration}
* @returns Promise<any>
*/
public static stopChannelMediaRelay(): Promise<any> {
return Agora.stopChannelMediaRelay();
Expand Down

0 comments on commit e41f146

Please sign in to comment.