瀏覽代碼

add return type for Peer#getConnection in index.d.ts

afrokick 6 年之前
父節點
當前提交
73d9dd653d
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      index.d.ts

+ 3 - 3
index.d.ts

@@ -101,10 +101,10 @@ declare class Peer {
 
 
   /**
   /**
    * Retrieve a data/media connection for this peer.
    * Retrieve a data/media connection for this peer.
-   * @param peer
-   * @param id
+   * @param peerId
+   * @param connectionId
    */
    */
-  getConnection(peer: Peer, id: string): any;
+  getConnection(peerId: string, connectionId: string): Peer.MediaConnection | Peer.DataConnection | null;
 
 
   /**
   /**
    * Get a list of available peer IDs
    * Get a list of available peer IDs