Table of Contents

Method GetFormattingEditsAfterKeystroke

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

GetFormattingEditsAfterKeystroke(int, string, bool, int, bool, out string)

Gets the text changes for the part of document accordingly to the formatting rules.

public virtual IEnumerable<TextChange> GetFormattingEditsAfterKeystroke(int pos, string key, bool useSpaces, int spacesInTab, bool applyChanges, out string newText)

Parameters

pos int

Current position within the text.

key string

Character being typed.

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.