Remove runtime type checks from calling service
This commit is contained in:
@@ -21,9 +21,6 @@ import {
|
|||||||
UserId,
|
UserId,
|
||||||
} from 'ringrtc';
|
} from 'ringrtc';
|
||||||
|
|
||||||
// ts-ignore
|
|
||||||
import is from '@sindresorhus/is';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ActionsType as UxActionsType,
|
ActionsType as UxActionsType,
|
||||||
CallDetailsType,
|
CallDetailsType,
|
||||||
@@ -61,26 +58,6 @@ export class CallingClass {
|
|||||||
if (!uxActions) {
|
if (!uxActions) {
|
||||||
throw new Error('CallingClass.initialize: Invalid uxActions.');
|
throw new Error('CallingClass.initialize: Invalid uxActions.');
|
||||||
}
|
}
|
||||||
if (!is.function_(uxActions.incomingCall)) {
|
|
||||||
throw new Error(
|
|
||||||
'CallingClass.initialize: Invalid uxActions.incomingCall'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!is.function_(uxActions.outgoingCall)) {
|
|
||||||
throw new Error(
|
|
||||||
'CallingClass.initialize: Invalid uxActions.outgoingCall'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!is.function_(uxActions.callStateChange)) {
|
|
||||||
throw new Error(
|
|
||||||
'CallingClass.initialize: Invalid uxActions.callStateChange'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (!is.function_(uxActions.remoteVideoChange)) {
|
|
||||||
throw new Error(
|
|
||||||
'CallingClass.initialize: Invalid uxActions.remoteVideoChange'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
RingRTC.handleOutgoingSignaling = this.handleOutgoingSignaling.bind(this);
|
RingRTC.handleOutgoingSignaling = this.handleOutgoingSignaling.bind(this);
|
||||||
RingRTC.handleIncomingCall = this.handleIncomingCall.bind(this);
|
RingRTC.handleIncomingCall = this.handleIncomingCall.bind(this);
|
||||||
RingRTC.handleAutoEndedIncomingCallRequest = this.handleAutoEndedIncomingCallRequest.bind(
|
RingRTC.handleAutoEndedIncomingCallRequest = this.handleAutoEndedIncomingCallRequest.bind(
|
||||||
|
Reference in New Issue
Block a user