File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -861,6 +861,11 @@ namespace ts.server.protocol {
861
861
* Length of the span.
862
862
*/
863
863
length : number ;
864
+ /**
865
+ * Optional parameter for the semantic highlighting response, if absent it
866
+ * defaults to "original".
867
+ */
868
+ format ?: "original" | "2020"
864
869
}
865
870
866
871
/**
Original file line number Diff line number Diff line change @@ -1115,7 +1115,8 @@ namespace ts.server {
1115
1115
1116
1116
private getEncodedSemanticClassifications ( args : protocol . EncodedSemanticClassificationsRequestArgs ) {
1117
1117
const { file, project } = this . getFileAndProject ( args ) ;
1118
- return project . getLanguageService ( ) . getEncodedSemanticClassifications ( file , args ) ;
1118
+ const format = args . format === "2020" ? SemanticClassificationFormat . TwentyTwenty : SemanticClassificationFormat . Original ;
1119
+ return project . getLanguageService ( ) . getEncodedSemanticClassifications ( file , args , format ) ;
1119
1120
}
1120
1121
1121
1122
private getProject ( projectFileName : string | undefined ) : Project | undefined {
You can’t perform that action at this time.
0 commit comments