Jonas Gloning 1 жил өмнө
parent
commit
e40007a698
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      lib/peer.ts

+ 3 - 2
lib/peer.ts

@@ -109,7 +109,8 @@ export interface PeerEvents {
 	error: (error: PeerError<`${PeerErrorType}`>) => void;
 }
 
-export interface IPeer {
+export interface IPeer
+	extends EventEmitterWithError<PeerErrorType, PeerEvents> {
 	/**
 	 * The brokering ID of this peer
 	 *
@@ -137,7 +138,7 @@ export interface IPeer {
 	 * @param peer The brokering ID of the remote peer (their {@link Peer.id}).
 	 * @param options for specifying details about Peer Connection
 	 */
-	connect(peer: string, options: PeerConnectOption): DataConnection;
+	connect(peer: string, options?: PeerConnectOption): DataConnection;
 	/**
 	 * Calls the remote peer specified by id and returns a media connection.
 	 * @param peer The brokering ID of the remote peer (their peer.id).