ReSharper 2017.1 Help

TypeScript - Line Breaks

Blank lines

Min blank lines around fields and signature declarations

Property names:

[resharper_]js_min_blank_lines_around_fields, [resharper_]min_blank_lines_around_fields

Possible values:

an integer

Examples:

Before formatting After formatting, value: 0
class·{ public·f1number; public·f2number; }
class·{ ··public·f1number; ··public·f2number; }
Before formatting After formatting, value: 1
class·{ public·f1number; public·f2number; }
class·{ ··public·f1number; ··public·f2number; }
Before formatting After formatting, value: 2
class·{ public·f1number; public·f2number; }
class·{ ··public·f1number; ··public·f2number; }

Min blank lines around types and modules

Property names:

[resharper_]js_min_blank_lines_around_types, [resharper_]min_blank_lines_around_types

Possible values:

an integer

Examples:

Before formatting After formatting, value: 0
class·C1·{ public·fnumber; } class·C2·{ public·fnumber; }
class·C1·{ ··public·fnumber; } class·C2·{ ··public·fnumber; }
Before formatting After formatting, value: 1
class·C1·{ public·fnumber; } class·C2·{ public·fnumber; }
class·C1·{ ··public·fnumber; } class·C2·{ ··public·fnumber; }
Before formatting After formatting, value: 2
class·C1·{ public·fnumber; } class·C2·{ public·fnumber; }
class·C1·{ ··public·fnumber; } class·C2·{ ··public·fnumber; }

Line breaks

Enumerations

Property names:

[resharper_]js_wrap_enum_style, [resharper_]wrap_enum_style

Possible values:

  • line_break: Force line breaks
  • on_single_line: Force put on single line
  • do_not_change: Do not change

Examples:

Before formatting After formatting, line_break
enum·A1A2A3·} enum·{· ··B1, ··B2, ··B3, }
enum·{ ··A1, ··A2, ··A3 } enum·{ ··B1, ··B2, ··B3, }
Before formatting After formatting, on_single_line
enum·A1A2A3·} enum·{· ··B1, ··B2, ··B3, }
enum·A1A2A3·} enum·B1B2B3}
Before formatting After formatting, do_not_change
enum·A1A2A3·} enum·{· ··B1, ··B2, ··B3, }
enum·A1A2A3·} enum·{ ··B1, ··B2, ··B3, }

Wrapping and chopping

Wrap union type usage

Property names:

[resharper_]js_wrap_union_type_usage, [resharper_]wrap_union_type_usage

Possible values:

  • chop_always: Chop always
  • chop_if_long: Chop if long or multiline
  • wrap_if_long: Simple wrap

Examples:

Before formatting After formatting, chop_always
type·'first'second| 'third'; type·'x'·'y'·'z'; type·'a'·'b'·'c'·'d'·'e'·'f'·'g'·'h'·'i'·'j'·'k'·'l'·'m'·'n'·'o'·'p'·'q'·'r'·'s'·'t'·'u'·'v'·'w'·'x'·'y'·'z';
type·'first| ·········'second| ·········'third'; type·'x'·| ·········'y'·| ·········'z'; type·'a'·| ·········'b'·| ·········'c'·| ·········'d'·| ·········'e'·| ·········'f'·| ·········'g'·| ·········'h'·| ·········'i'·| ·········'j'·| ·········'k'·| ·········'l'·| ·········'m'·| ·········'n'·| ·········'o'·| ·········'p'·| ·········'q'·| ·········'r'·| ·········'s'·| ·········'t'·| ·········'u'·| ·········'v'·| ·········'w'·| ·········'x'·| ·········'y'·| ·········'z';
Before formatting After formatting, chop_if_long
type·'first'second| 'third'; type·'x'·'y'·'z'; type·'a'·'b'·'c'·'d'·'e'·'f'·'g'·'h'·'i'·'j'·'k'·'l'·'m'·'n'·'o'·'p'·'q'·'r'·'s'·'t'·'u'·'v'·'w'·'x'·'y'·'z';
type·'first| ·········'second| ·········'third'; type·'x'·'y'·'z'; type·'a'·| ·········'b'·| ·········'c'·| ·········'d'·| ·········'e'·| ·········'f'·| ·········'g'·| ·········'h'·| ·········'i'·| ·········'j'·| ·········'k'·| ·········'l'·| ·········'m'·| ·········'n'·| ·········'o'·| ·········'p'·| ·········'q'·| ·········'r'·| ·········'s'·| ·········'t'·| ·········'u'·| ·········'v'·| ·········'w'·| ·········'x'·| ·········'y'·| ·········'z';
Before formatting After formatting, wrap_if_long
type·'first'second| 'third'; type·'x'·'y'·'z'; type·'a'·'b'·'c'·'d'·'e'·'f'·'g'·'h'·'i'·'j'·'k'·'l'·'m'·'n'·'o'·'p'·'q'·'r'·'s'·'t'·'u'·'v'·'w'·'x'·'y'·'z';
type·'first'second| ·········'third'; type·'x'·'y'·'z'; type·'a'·'b'·'c'·| ·········'d'·'e'·'f'·| ·········'g'·'h'·'i'·| ·········'j'·'k'·'l'·| ·········'m'·'n'·'o'·| ·········'p'·'q'·'r'·| ·········'s'·'t'·'u'·| ·········'v'·'w'·'x'·| ·········'y'·'z';

Place on a new line

Place each decorator on a new line

Property names:

[resharper_]js_place_each_decorator_on_new_line, [resharper_]place_each_decorator_on_new_line

Possible values:

true | false

Examples:

true
@test class·{ ··@test ··@custom ··m()·{ ··} };
false
@test class·{ ··@test·@custom ··m()·{ ··} };

Class decorators on the same line with class

Property names:

[resharper_]js_place_class_decorator_on_the_same_line, [resharper_]place_class_decorator_on_the_same_line

Possible values:

true | false

Examples:

true
@test·class·{ ··@test·@custom ··m()·{ ··} };
false
@test class·{ ··@test·@custom ··m()·{ ··} };

Method decorators on the same line with signature

Property names:

[resharper_]js_place_method_decorator_on_the_same_line, [resharper_]place_method_decorator_on_the_same_line

Possible values:

true | false

Examples:

true
@test class·{ ··m() ··@test·@custom·m()·{ ··} };
false
@test class·{ ··m() ··@test·@custom ··m()·{ ··} };

Property decorators on the same line with property

Property names:

[resharper_]js_place_property_decorator_on_the_same_line, [resharper_]place_property_decorator_on_the_same_line

Possible values:

true | false

Examples:

true
@test class·{ ··@test·@custom ··set·m(q{ ··} ··@test·@custom ··get·m()·{ ····return·null; ··} };
false
@test class·{ ··@test·@custom ··set·m(q{ ··} ··@test·@custom ··get·m()·{ ····return·null; ··} };

Field decorators on the same line with field

Property names:

[resharper_]js_place_field_decorator_on_the_same_line, [resharper_]place_field_decorator_on_the_same_line

Possible values:

true | false

Examples:

true
@test class·{ ··@test·@custom ··f; };
false
@test class·{ ··@test·@custom ··f; };
Last modified: 12 October 2017