@@ -4556,7 +4556,11 @@ declare namespace ts {
45564556 getFormattingEditsAfterKeystroke ( fileName : string , position : number , key : string , options : FormatCodeOptions | FormatCodeSettings ) : TextChange [ ] ;
45574557 getDocCommentTemplateAtPosition ( fileName : string , position : number ) : TextInsertion | undefined ;
45584558 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 ;
45604564 getSpanOfEnclosingComment ( fileName : string , position : number , onlyMultiLine : boolean ) : TextSpan | undefined ;
45614565 toLineColumnOffset ?( fileName : string , position : number ) : LineAndCharacter ;
45624566 getCodeFixesAtPosition ( fileName : string , start : number , end : number , errorCodes : ReadonlyArray < number > , formatOptions : FormatCodeSettings , preferences : UserPreferences ) : ReadonlyArray < CodeFixAction > ;
@@ -4578,6 +4582,9 @@ declare namespace ts {
45784582 getProgram ( ) : Program | undefined ;
45794583 dispose ( ) : void ;
45804584 }
4585+ interface JsxClosingTagInfo {
4586+ readonly newText : string ;
4587+ }
45814588 interface CombinedCodeFixScope {
45824589 type : "file" ;
45834590 fileName : string ;
@@ -5507,7 +5514,7 @@ declare namespace ts.server {
55075514 */
55085515declare namespace ts . server . protocol {
55095516 enum CommandTypes {
5510- AutoCloseTag = "autoCloseTag " ,
5517+ JsxClosingTag = "jsxClosingTag " ,
55115518 Brace = "brace" ,
55125519 BraceCompletion = "braceCompletion" ,
55135520 GetSpanOfEnclosingComment = "getSpanOfEnclosingComment" ,
@@ -6177,13 +6184,13 @@ declare namespace ts.server.protocol {
61776184 */
61786185 openingBrace : string ;
61796186 }
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 ;
61836190 }
6184- interface AutoCloseTagRequestArgs extends FileLocationRequestArgs {
6191+ interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
61856192 }
6186- interface AutoCloseTagResponse extends Response {
6193+ interface JsxClosingTagResponse extends Response {
61876194 readonly body : TextInsertion ;
61886195 }
61896196 /**
@@ -8474,7 +8481,7 @@ declare namespace ts.server {
84748481 private getSyntacticDiagnosticsSync ;
84758482 private getSemanticDiagnosticsSync ;
84768483 private getSuggestionDiagnosticsSync ;
8477- private getAutoCloseTag ;
8484+ private getJsxClosingTag ;
84788485 private getDocumentHighlights ;
84798486 private setCompilerOptionsForInferredProjects ;
84808487 private getProjectInfo ;
0 commit comments