Skip to content

Commit

Permalink
Remove runtime type checks from calling service
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn-Signal committed Nov 4, 2020
1 parent cfc3c12 commit b7a1ddf
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions ts/services/calling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ import {
UserId,
} from 'ringrtc';

// ts-ignore
import is from '@sindresorhus/is';

import {
ActionsType as UxActionsType,
CallDetailsType,
Expand Down Expand Up @@ -61,26 +58,6 @@ export class CallingClass {
if (!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.handleIncomingCall = this.handleIncomingCall.bind(this);
RingRTC.handleAutoEndedIncomingCallRequest = this.handleAutoEndedIncomingCallRequest.bind(
Expand Down

0 comments on commit b7a1ddf

Please sign in to comment.