File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 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 {
861861 * Length of the span.
862862 */
863863 length : number ;
864+ /**
865+ * Optional parameter for the semantic highlighting response, if absent it
866+ * defaults to "original".
867+ */
868+ format ?: "original" | "2020"
864869 }
865870
866871 /**
Original file line number Diff line number Diff line change @@ -1115,7 +1115,8 @@ namespace ts.server {
11151115
11161116 private getEncodedSemanticClassifications ( args : protocol . EncodedSemanticClassificationsRequestArgs ) {
11171117 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 ) ;
11191120 }
11201121
11211122 private getProject ( projectFileName : string | undefined ) : Project | undefined {
You can’t perform that action at this time.
0 commit comments