Missing javascript code completion for WebRTC and others

Hey there,

I'm trying to figure out how to get webstorm to code complete WebRTC functions and variables.

Things like window.RTCPeerConnection, window.RTCSessionDescription... I'm also interested in how I would go about adding completion support for creation google Chrome extensions. Things like 'chrome.runtime.sendMessage'.

2 comments
Comment actions Permalink

WebStrom doesn't (and can't) provide out-of-box support for each and every Javascript API in the world. Normally the corresponding .js/d.ts files have to be downloaded from internet and configured as javascript libraries (http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/)

Seems that 'webrtc' typescript stubs available at https://github.com/borisyankov/DefinitelyTyped should do the thing. Please open Settings/Languages & Frameworks/JavaScript/Libraries, press Download..., select the 'Typescript community stubs' from the dropdown and then choose 'webrtc' library from the list

1
Comment actions Permalink

Thanks Elena, that's exactly what I was looking for. I didn't realize that typescript definitions could be used when not actually compiling typescript. That's awesome!

0

Please sign in to leave a comment.