Features WebStorm

New in 5.0: Google Closure Compiler JSDoc annotations

Providing comments and annotations to your JavaScript code is a way to make it more definite and easier to read by other developers. It is especially important in large projects. Some static code analysis tools and verifiers take types and other information provided in JSDoc tags into consideration and report warnings if code is inconsistent with annotations. We suggest you as developers to developers to use annotations as much as possible.

JSDoc tags support in PhpStorm/WebStorm 5.0 has been improved to make your coding experience better. When something is known about current context, more relevant completion options will be shown and more static errors will be reported instantly. In the upcoming PhpStorm/WebStorm 5.0 EAP nearly all of Google Closure compiler JSDoc tags are supported.  In addition to @param, @type, @extends etc., following tags will also be handled better:

@interface and @implements

Quick fix(Alt+Enter) automatically implements all methods.Clicking on gutter icon allows you to jump to overridden function.When not all methods from interface are implemented, IDE will warn you about it and suggest to implement methods. Symbols from base interface will go to the completion list even if they are not implemented in a subclass (or IDE doesn’t see them to be implemented).

multiple inheritance

Completion shows options from all extended classes

@typedef

Typedef is used for complex types aliasing

@private and @protected

When @private or @protected tag is specified for property, it won't appear in completion according to visibility rules

You should disable checkbox “Weaker type guess for completion” in Settings|JavaScript if you want symbols marked with @private and @protected tags to be removed from completion list in contexts where they are not accessible.

Also @enum, @override, @inheritDoc, @property, @lends, @constructs, @mixin and @mixes are supported now and completion, documentation lookup and parameter info take them into consideration.

You can already try all of described functionality in the latest EAP, so don’t hesitate to download it. Bug reports and suggestions are welcomed in our issue tracker.

Coming soon: enhanced Google Closure types syntax.