import Promise from 'bluebird'; export interface MediaDevices { getUserMedia: (constants: MediaStreamConstraints) => Promise; } export interface WebRTC { newRTCPeerConnection: (config: RTCConfiguration) => RTCPeerConnection; newRTCSessionDescription: (jsep: RTCSessionDescription) => RTCSessionDescription; newRTCIceCandidate: (candidate: RTCIceCandidate) => RTCIceCandidate; }