From ef258b7ceb3df1dff74d8047fb35d2944ec49f20 Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Tue, 10 Mar 2020 14:26:16 -0500 Subject: [PATCH 1/2] Update type of constructor option iceServer Based on the current RTCConfiguration spec (https://w3c.github.io/webrtc-pc/#dom-rtcconfiguration), iceServers does not expect an array of strings. Updating to type provided by TypeScript's lib.dom.d.ts --- npm/janus.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/janus.d.ts b/npm/janus.d.ts index eed600573e..4067e2a72a 100644 --- a/npm/janus.d.ts +++ b/npm/janus.d.ts @@ -25,7 +25,7 @@ declare namespace JanusJS { interface ConstuctorOptions { server: string | string[]; - iceServers?: string[]; + iceServers?: RTCIceServer[]; ipv6?: boolean; withCredentials?: boolean; max_poll_events?: number; From e2e0a321ee3e784963e5d4c251870c7a8778f8ee Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Tue, 10 Mar 2020 14:27:08 -0500 Subject: [PATCH 2/2] Fix typo in ContructorOptions interface --- npm/janus.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/janus.d.ts b/npm/janus.d.ts index 4067e2a72a..ace8aacfc4 100644 --- a/npm/janus.d.ts +++ b/npm/janus.d.ts @@ -23,7 +23,7 @@ declare namespace JanusJS { dependencies?: Dependencies; } - interface ConstuctorOptions { + interface ConstructorOptions { server: string | string[]; iceServers?: RTCIceServer[]; ipv6?: boolean; @@ -138,7 +138,7 @@ declare namespace JanusJS { static error(...args: any[]): void; static randomString(length: number): string; - constructor(options: ConstuctorOptions); + constructor(options: ConstructorOptions); getServer(): string; isConnected(): boolean;