In the example here, typing
== was intended, could
to a very subtle bug... but not with ReSharper.
When analyzing your code, ReSharper takes into account the language level, which is configurable. By default, a language level is selected based on project settings, but you can override the setting if necessary.
ReSharper makes JSDoc comments much easier to read by highlighting their syntax. When you type JSDoc comments, ReSharper helps you by completing your input. For example, you can type /** above a function and ReSharper will generate documentation stubs for all parameters and for the return value. JSDoc types, typedefs and callbacks are also properly highlighted and become available in code completion.
Besides, all JSDoc comments for symbols are available on usages of these symbols in the Quick Documentation pop-up.
By default, regular expressions are recognized in regular expression literals,
RegExp constructors and methods, as well as in
However, you can always tell ReSharper to analyze any string literal as regular
When you press Alt+Insert on a TypeScript type declaration, ReSharper lets you quickly create a constructor for this type. The constructor generation wizard creates a non-default constructor that takes selected fields from the type and base types as parameters.
For inherited types, there are two related code generation features:
In fact, code formatting works even better than in C#: press Alt+Enter on a selected code block and choose Format selection | Configure to see and configure all formatting rules that affect the selected block.
In TypeScript, you can additionally control how to specify types in declarations
(explicit type name,
any), whether to use the
public modifier explicitly, and how to import modules.
In case a Node.js interpreter is already configured on your machine, you can enable linters in ReSharper settings under Tools | Web Linters.
JSON value helpers allow you to tell ReSharper to provide code completion or validation for your own JSON files. You can add a helper in the JSON Value Helpers options page, matching based on a filename mask and/or schema match. Custom JSON schema catalogs can also be added in JSON options.
All keyboard shortcuts provided in this page are available in ReSharper's default "Visual Studio" keymap. For details on ReSharper's two keymaps, see ReSharper Documentation.