ReSharper 2017.1 Help

Code Style

ReSharper | Options | Code Editing | TypeScript | Code Style

Preferences configurable on this page affect the behaviour of specific Code Style and Cleanup features. The preferences are taken into account when ReSharper applies refactorings, code templates or produces generated code. They can be also applied to the existing code by using code cleanup with the corresponding settings.

The preferences with the Notify with selector have corresponding code inspections that notify you if this aspect of the code style in the inspected scope differs from the the preferred style. Using these selectors, you can configure severity levels of the inspections.

Quotes (inherited from JavaScript) The preference in this section defines whether apostrophe (') or quote (") should be used as a quote symbol.
This preference is shared with the corresponding preference for JavaScript, i.e. if you change it here, the same preference on the Code Editing | JavaScript | Code Style page of ReSharper options it also changed.
Modifiers The preference in this section defines whether the 'public' modifier should be used explicitly.
Aliases Preferences in this section define how to handle aliases.
  • Prefer adding module aliases...
    specifies whether to use non-qualified type names and add the necessary module aliases or use fully qualified type names.
  • Relative file reference style in 'require'
    specifies whether or not to use the leading ./ characters. For example, import X = require("file1") or import X = require("./file1"). If you choose Relative to root folder, you can specify the path to the root folder on the Code Editing | TypeScript | Generated Code page of ReSharper options.
Type specification

Preferences in this section define whether and when types should be specified explicitly and whether the implicit 'any' is allowed.

The preference of using implicit 'any' can be also configured in project settings. If the implicit 'any' types are not allowed in the project settings, they are always highlighted as errors independently of your code style preferences.

See Also

Last modified: 4 July 2017