File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ namespace ts.server.protocol {
94
94
ApplyChangedToOpenFiles = "applyChangedToOpenFiles" ,
95
95
UpdateOpen = "updateOpen" ,
96
96
/* @internal */
97
+ EncodedSyntacticClassificationsFull = "encodedSyntacticClassifications-full" ,
98
+ /* @internal */
97
99
EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full" ,
98
100
/* @internal */
99
101
Cleanup = "cleanup" ,
@@ -764,6 +766,28 @@ namespace ts.server.protocol {
764
766
body ?: string [ ] ;
765
767
}
766
768
769
+ /**
770
+ * A request to get encoded Syntactic classifications for a span in the file
771
+ */
772
+ /** @internal */
773
+ export interface EncodedSyntacticClassificationsRequest extends FileRequest {
774
+ arguments : EncodedSyntacticClassificationsRequestArgs ;
775
+ }
776
+
777
+ /**
778
+ * Arguments for EncodedSyntacticClassificationsRequest request.
779
+ */
780
+ export interface EncodedSyntacticClassificationsRequestArgs extends FileRequestArgs {
781
+ /**
782
+ * Start position of the span.
783
+ */
784
+ start : number ;
785
+ /**
786
+ * Length of the span.
787
+ */
788
+ length : number ;
789
+ }
790
+
767
791
/**
768
792
* A request to get encoded semantic classifications for a span in the file
769
793
*/
Original file line number Diff line number Diff line change @@ -881,6 +881,11 @@ namespace ts.server {
881
881
}
882
882
}
883
883
884
+ private getEncodedSyntacticClassifications ( args : protocol . EncodedSyntacticClassificationsRequestArgs ) {
885
+ const { file, project } = this . getFileAndProject ( args ) ;
886
+ return project . getLanguageService ( ) . getEncodedSyntacticClassifications ( file , args ) ;
887
+ }
888
+
884
889
private getEncodedSemanticClassifications ( args : protocol . EncodedSemanticClassificationsRequestArgs ) {
885
890
const { file, project } = this . getFileAndProject ( args ) ;
886
891
return project . getLanguageService ( ) . getEncodedSemanticClassifications ( file , args ) ;
@@ -2299,6 +2304,9 @@ namespace ts.server {
2299
2304
[ CommandNames . CompilerOptionsDiagnosticsFull ] : ( request : protocol . CompilerOptionsDiagnosticsRequest ) => {
2300
2305
return this . requiredResponse ( this . getCompilerOptionsDiagnostics ( request . arguments ) ) ;
2301
2306
} ,
2307
+ [ CommandNames . EncodedSyntacticClassificationsFull ] : ( request : protocol . EncodedSyntacticClassificationsRequest ) => {
2308
+ return this . requiredResponse ( this . getEncodedSyntacticClassifications ( request . arguments ) ) ;
2309
+ } ,
2302
2310
[ CommandNames . EncodedSemanticClassificationsFull ] : ( request : protocol . EncodedSemanticClassificationsRequest ) => {
2303
2311
return this . requiredResponse ( this . getEncodedSemanticClassifications ( request . arguments ) ) ;
2304
2312
} ,
You can’t perform that action at this time.
0 commit comments