@@ -4556,7 +4556,11 @@ declare namespace ts {
4556
4556
getFormattingEditsAfterKeystroke ( fileName : string , position : number , key : string , options : FormatCodeOptions | FormatCodeSettings ) : TextChange [ ] ;
4557
4557
getDocCommentTemplateAtPosition ( fileName : string , position : number ) : TextInsertion | undefined ;
4558
4558
isValidBraceCompletionAtPosition ( fileName : string , position : number , openingBrace : number ) : boolean ;
4559
- getAutoCloseTagAtPosition ( fileName : string , position : number ) : string | undefined ;
4559
+ /**
4560
+ * This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
4561
+ * Editors should call this after `>` is typed.
4562
+ */
4563
+ getJsxClosingTagAtPosition ( fileName : string , position : number ) : JsxClosingTagInfo | undefined ;
4560
4564
getSpanOfEnclosingComment ( fileName : string , position : number , onlyMultiLine : boolean ) : TextSpan | undefined ;
4561
4565
toLineColumnOffset ?( fileName : string , position : number ) : LineAndCharacter ;
4562
4566
getCodeFixesAtPosition ( fileName : string , start : number , end : number , errorCodes : ReadonlyArray < number > , formatOptions : FormatCodeSettings , preferences : UserPreferences ) : ReadonlyArray < CodeFixAction > ;
@@ -4578,6 +4582,9 @@ declare namespace ts {
4578
4582
getProgram ( ) : Program | undefined ;
4579
4583
dispose ( ) : void ;
4580
4584
}
4585
+ interface JsxClosingTagInfo {
4586
+ readonly newText : string ;
4587
+ }
4581
4588
interface CombinedCodeFixScope {
4582
4589
type : "file" ;
4583
4590
fileName : string ;
@@ -5507,7 +5514,7 @@ declare namespace ts.server {
5507
5514
*/
5508
5515
declare namespace ts . server . protocol {
5509
5516
enum CommandTypes {
5510
- AutoCloseTag = "autoCloseTag " ,
5517
+ JsxClosingTag = "jsxClosingTag " ,
5511
5518
Brace = "brace" ,
5512
5519
BraceCompletion = "braceCompletion" ,
5513
5520
GetSpanOfEnclosingComment = "getSpanOfEnclosingComment" ,
@@ -6177,13 +6184,13 @@ declare namespace ts.server.protocol {
6177
6184
*/
6178
6185
openingBrace : string ;
6179
6186
}
6180
- interface AutoCloseTagRequest extends FileLocationRequest {
6181
- readonly command : CommandTypes . AutoCloseTag ;
6182
- readonly arguments : AutoCloseTagRequestArgs ;
6187
+ interface JsxClosingTagRequest extends FileLocationRequest {
6188
+ readonly command : CommandTypes . JsxClosingTag ;
6189
+ readonly arguments : JsxClosingTagRequestArgs ;
6183
6190
}
6184
- interface AutoCloseTagRequestArgs extends FileLocationRequestArgs {
6191
+ interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
6185
6192
}
6186
- interface AutoCloseTagResponse extends Response {
6193
+ interface JsxClosingTagResponse extends Response {
6187
6194
readonly body : TextInsertion ;
6188
6195
}
6189
6196
/**
@@ -8474,7 +8481,7 @@ declare namespace ts.server {
8474
8481
private getSyntacticDiagnosticsSync ;
8475
8482
private getSemanticDiagnosticsSync ;
8476
8483
private getSuggestionDiagnosticsSync ;
8477
- private getAutoCloseTag ;
8484
+ private getJsxClosingTag ;
8478
8485
private getDocumentHighlights ;
8479
8486
private setCompilerOptionsForInferredProjects ;
8480
8487
private getProjectInfo ;
0 commit comments