Table of Contents

Method GetFormattingEditsForRange

Namespace
Alternet.Syntax.Parsers.TypeScript
Assembly
Alternet.Syntax.Parsers.TypeScript.v9.dll

GetFormattingEditsForRange(int, int, bool, int, bool, out string)

When implemented by a class, gets the text changes for the part of document accordingly to the formatting rules.

IEnumerable<TextChange> GetFormattingEditsForRange(int start, int end, bool useSpaces, int spacesInTab, bool applyChanges, out string newText)

Parameters

start int

Start position of code being formatted.

end int

End position of code being formatted.

useSpaces bool

Indicates whether indentation string should contain spaces or tabs.

spacesInTab int

Specifies number of spaces in tab.

applyChanges bool

Forces to apply found changes to the new text.

newText string

Receives formatted code.

Returns

IEnumerable<TextChange>

List of TextChanges representing difference between old and new code.