Skip to main content

Module source_edits

Module source_edits 

Source
Expand description

The byte spans of the top-level export statements of a file, and the edits that remove their export keyword.

fallow fix, the language server and the CI review comments change source text. A line rule cannot tell which export keyword of a line belongs to a name, which names one keyword exports, or where a declaration ends. This module parses the file and answers these questions from the syntax tree. A file that does not parse gets no index, and so no edit.

Structs§

EnumSpans
One enum declaration with the spans of its members.
ExportStatement
One top-level export <declaration> or export default statement.
MemberSpan
One class element or enum member.
SourceEditIndex
The export statements and the class and enum members of one file text.
SpanEdit
One replacement of a byte range of the source text.

Enums§

EditRefusal
Why the index gives no statement for a request.
ExportStatementKind
The form of one export statement.
MergeKind
A declaration form that TypeScript merges with other declarations of the same name. All declarations of one merge must be exported, or none (TS2383 for function overloads, TS2395 for each other merge).