@@ -4566,6 +4566,11 @@ declare namespace ts {
45664566 getFormattingEditsAfterKeystroke ( fileName : string , position : number , key : string , options : FormatCodeOptions | FormatCodeSettings ) : TextChange [ ] ;
45674567 getDocCommentTemplateAtPosition ( fileName : string , position : number ) : TextInsertion | undefined ;
45684568 isValidBraceCompletionAtPosition ( fileName : string , position : number , openingBrace : number ) : boolean ;
4569+ /**
4570+ * 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.
4571+ * Editors should call this after `>` is typed.
4572+ */
4573+ getJsxClosingTagAtPosition ( fileName : string , position : number ) : JsxClosingTagInfo | undefined ;
45694574 getSpanOfEnclosingComment ( fileName : string , position : number , onlyMultiLine : boolean ) : TextSpan | undefined ;
45704575 toLineColumnOffset ?( fileName : string , position : number ) : LineAndCharacter ;
45714576 getCodeFixesAtPosition ( fileName : string , start : number , end : number , errorCodes : ReadonlyArray < number > , formatOptions : FormatCodeSettings , preferences : UserPreferences ) : ReadonlyArray < CodeFixAction > ;
@@ -4587,6 +4592,9 @@ declare namespace ts {
45874592 getProgram ( ) : Program | undefined ;
45884593 dispose ( ) : void ;
45894594 }
4595+ interface JsxClosingTagInfo {
4596+ readonly newText : string ;
4597+ }
45904598 interface CombinedCodeFixScope {
45914599 type : "file" ;
45924600 fileName : string ;
@@ -5516,6 +5524,7 @@ declare namespace ts.server {
55165524 */
55175525declare namespace ts . server . protocol {
55185526 enum CommandTypes {
5527+ JsxClosingTag = "jsxClosingTag" ,
55195528 Brace = "brace" ,
55205529 BraceCompletion = "braceCompletion" ,
55215530 GetSpanOfEnclosingComment = "getSpanOfEnclosingComment" ,
@@ -6185,6 +6194,15 @@ declare namespace ts.server.protocol {
61856194 */
61866195 openingBrace : string ;
61876196 }
6197+ interface JsxClosingTagRequest extends FileLocationRequest {
6198+ readonly command : CommandTypes . JsxClosingTag ;
6199+ readonly arguments : JsxClosingTagRequestArgs ;
6200+ }
6201+ interface JsxClosingTagRequestArgs extends FileLocationRequestArgs {
6202+ }
6203+ interface JsxClosingTagResponse extends Response {
6204+ readonly body : TextInsertion ;
6205+ }
61886206 /**
61896207 * @deprecated
61906208 * Get occurrences request; value of command field is
@@ -8473,6 +8491,7 @@ declare namespace ts.server {
84738491 private getSyntacticDiagnosticsSync ;
84748492 private getSemanticDiagnosticsSync ;
84758493 private getSuggestionDiagnosticsSync ;
8494+ private getJsxClosingTag ;
84768495 private getDocumentHighlights ;
84778496 private setCompilerOptionsForInferredProjects ;
84788497 private getProjectInfo ;
0 commit comments