ReSharper 2022.3 Help

EditorConfig properties for TypeScript: Spaces

Type parameters and arguments

Before brackets

Property names:

[resharper_]js_space_before_type_parameters_brackets, [resharper_]space_before_type_parameters_brackets

Possible values:

true | false

Examples:

true

class C <T1, T2> { } var a: C <number, string>;

false

class C<T1, T2> { } var a: C<number, string>;

Within brackets

Property names:

[resharper_]js_space_within_type_parameters_brackets, [resharper_]space_within_type_parameters_brackets

Possible values:

true | false

Examples:

true

class C< T1, T2 > { } var a: C< number, string >;

false

class C<T1, T2> { } var a: C<number, string>;

Type annotations

Before ':'

Property names:

[resharper_]js_space_before_colon_in_type_annotation, [resharper_]space_before_colon_in_type_annotation

Possible values:

true | false

Examples:

true

var a : SomeType;

false

var a: SomeType;

After '?'

Property names:

[resharper_]js_space_after_colon_in_type_annotation, [resharper_]space_after_colon_in_type_annotation

Possible values:

true | false

Examples:

true

var a: SomeType;

false

var a:SomeType;

Union and intersection types

Around '|' or '&' in type usage

Property names:

[resharper_]js_space_around_pipe_or_amper_in_type_usage, [resharper_]space_around_pipe_or_amper_in_type_usage

Possible values:

true | false

Examples:

true

var a: SomeType | OtherType;

false

var a: SomeType|OtherType;
Last modified: 28 December 2022