I\'m building a small Angular2 app and I\'m trying to use a MediaRecorder object (https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder) like so:
va
You can now add types for MediaRecorder even easier, just install them through npm.
npm install @types/dom-mediacapture-record
This will load the latest type definitions from DefinitelyTyped. They will automatically work, no extra steps. If you have any improvements for the typings feel free to contribute them to DefinitelyTyped.
That solution proposed by Elias Meire is the best for me. But indeed I needed some extra steps to make it work. As stated in this issue on github https://github.com/Microsoft/TypeScript/issues/11420#issuecomment-341625253, you have to reference it to use it with this line:
///