TypeScript prevents me from passing the correct constraints to getUserMedia
问题 I'm trying to get a screen to stream to my Angular 5 Electron app. I'm using the desktopCapturer provided by Electron. This is my code: loadCurrentScreensource() { desktopCapturer.getSources({ types: [ 'window', 'screen' ] }, (error, sources) => { if (error) { throw error; } console.log('Finding screen: ' + this.selectedScreenSource); console.log(sources); for (let i = 0; i < sources.length; ++i) { if (sources[i].id === this.selectedScreenSource.id) { console.log('Found screen'); const