diff --git a/src/ion.ts b/src/ion.ts index 91a611a2..ffe2992f 100644 --- a/src/ion.ts +++ b/src/ion.ts @@ -20,7 +20,7 @@ export enum PeerState { export interface Peer { uid: string; sid: string; - info: Map; + info: Record; } export interface PeerEvent { @@ -55,7 +55,7 @@ export interface Stream { export interface Message { from: string; to: string; - data: Map; + data: Record; } export class IonConnector { @@ -135,7 +135,7 @@ export class IonConnector { return this._sfu; } - async join(sid: string, uid: string, info: Map, token: string | undefined): Promise { + async join(sid: string, uid: string, info: Record, token: string | undefined): Promise { this._sid = sid; this._uid = uid; return this._biz.join(sid, uid, info, token); @@ -145,7 +145,7 @@ export class IonConnector { return this._biz.leave(uid); } - async message(from: string, to: string, data: Map): Promise { + async message(from: string, to: string, data: Record): Promise { return this._biz.sendMessage(from, to, data); } diff --git a/src/signal/biz.ts b/src/signal/biz.ts index fdf5d5c9..71a8c181 100644 --- a/src/signal/biz.ts +++ b/src/signal/biz.ts @@ -99,7 +99,7 @@ export class BizClient extends EventEmitter { }); } - async join(sid: string, uid: string, info: Map, token: string | undefined): Promise { + async join(sid: string, uid: string, info: Record, token: string | undefined): Promise { const request = new biz.SignalRequest(); const join = new biz.Join(); join.setToken(token || ''); @@ -141,7 +141,7 @@ export class BizClient extends EventEmitter { }); } - async sendMessage(from: string, to: string, data: Map) { + async sendMessage(from: string, to: string, data: Record) { const request = new biz.SignalRequest(); const message = new ion.Message(); message.setFrom(from);