@@ -4566,6 +4566,11 @@ declare namespace ts {
4566
4566
getFormattingEditsAfterKeystroke ( fileName : string , position : number , key : string , options : FormatCodeOptions | FormatCodeSettings ) : TextChange [ ] ;
4567
4567
getDocCommentTemplateAtPosition ( fileName : string , position : number ) : TextInsertion | undefined ;
4568
4568
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 ;
4569
4574
getSpanOfEnclosingComment ( fileName : string , position : number , onlyMultiLine : boolean ) : TextSpan | undefined ;
4570
4575
toLineColumnOffset ?( fileName : string , position : number ) : LineAndCharacter ;
4571
4576
getCodeFixesAtPosition ( fileName : string , start : number , end : number , errorCodes : ReadonlyArray < number > , formatOptions : FormatCodeSettings , preferences : UserPreferences ) : ReadonlyArray < CodeFixAction > ;
@@ -4587,6 +4592,9 @@ declare namespace ts {
4587
4592
getProgram ( ) : Program | undefined ;
4588
4593
dispose ( ) : void ;
4589
4594
}
4595
+ interface JsxClosingTagInfo {
4596
+ readonly newText : string ;
4597
+ }
4590
4598
interface CombinedCodeFixScope {
4591
4599
type : "file" ;
4592
4600
fileName : string ;
@@ -5516,6 +5524,7 @@ declare namespace ts.server {
5516
5524
*/
5517
5525
declare namespace ts . server . protocol {
5518
5526
enum CommandTypes {
5527
+ JsxClosingTag = "jsxClosingTag" ,
5519
5528
Brace = "brace" ,
5520
5529
BraceCompletion = "braceCompletion" ,
5521
5530
GetSpanOfEnclosingComment = "getSpanOfEnclosingComment" ,
@@ -6185,6 +6194,15 @@ declare namespace ts.server.protocol {
6185
6194
*/
6186
6195
openingBrace : string ;
6187
6196
}
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
+ }
6188
6206
/**
6189
6207
* @deprecated
6190
6208
* Get occurrences request; value of command field is
@@ -8473,6 +8491,7 @@ declare namespace ts.server {
8473
8491
private getSyntacticDiagnosticsSync ;
8474
8492
private getSemanticDiagnosticsSync ;
8475
8493
private getSuggestionDiagnosticsSync ;
8494
+ private getJsxClosingTag ;
8476
8495
private getDocumentHighlights ;
8477
8496
private setCompilerOptionsForInferredProjects ;
8478
8497
private getProjectInfo ;
0 commit comments