Add SVGElement class definition

Is there a way to add class definitions to WebStorm, basically in the same way JetBrains do in DHTML.js i.e. to include classes not yet included (like for example SVGElement) so that it dosent show up as unresolved in WS inspections.


1 comment
Comment actions Permalink

Yes, sure - just create a .js or d.ts file with class definition stub and then set it up as a javascript library in Settings/Languages & Frameworks/javaScript/Libraries
I'd recommend using JSDoc annotations in your stubs where possible to provide WebStorm with API documentation (will be available on ctrl+Q) and make completion more accurate


Please sign in to leave a comment.