TypeScript Version: atom-typescript
Code
var a = navigator.mediaDevices.getUserMedia(options);
a.catch( () => console.log );
//ERROR: 'catch' does not exists on type 'PromiseLike<MediaStream>'
Expected behavior:
Acording to MDN, navigator.mediaDevices.getUserMedia returns a Promise (with a catch method), not a PromiseLike (without catch method).
Actual behavior:
navigator.mediaDevices.getUserMedia returns a PromiseLike<MediaStream>
It needs to return a Promise<MediaStream>
TypeScript Version: atom-typescript
Code
Expected behavior:
Acording to MDN, navigator.mediaDevices.getUserMedia returns a
Promise(with a catch method), not aPromiseLike(without catch method).Actual behavior:
navigator.mediaDevices.getUserMedia returns a
PromiseLike<MediaStream>It needs to return a
Promise<MediaStream>