File tree Expand file tree Collapse file tree
tests/baselines/reference/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ namespace ts.server.protocol {
9494 ApplyChangedToOpenFiles = "applyChangedToOpenFiles" ,
9595 UpdateOpen = "updateOpen" ,
9696 /* @internal */
97+ EncodedSyntacticClassificationsFull = "encodedSyntacticClassifications-full" ,
98+ /* @internal */
9799 EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full" ,
98100 /* @internal */
99101 Cleanup = "cleanup" ,
@@ -764,6 +766,29 @@ namespace ts.server.protocol {
764766 body ?: string [ ] ;
765767 }
766768
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+ /** @internal */
781+ export interface EncodedSyntacticClassificationsRequestArgs extends FileRequestArgs {
782+ /**
783+ * Start position of the span.
784+ */
785+ start : number ;
786+ /**
787+ * Length of the span.
788+ */
789+ length : number ;
790+ }
791+
767792 /**
768793 * A request to get encoded semantic classifications for a span in the file
769794 */
@@ -775,6 +800,7 @@ namespace ts.server.protocol {
775800 /**
776801 * Arguments for EncodedSemanticClassificationsRequest request.
777802 */
803+ /** @internal */
778804 export interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
779805 /**
780806 * Start position of the span.
Original file line number Diff line number Diff line change @@ -881,6 +881,11 @@ namespace ts.server {
881881 }
882882 }
883883
884+ private getEncodedSyntacticClassifications ( args : protocol . EncodedSyntacticClassificationsRequestArgs ) {
885+ const { file, languageService } = this . getFileAndLanguageServiceForSyntacticOperation ( args ) ;
886+ return languageService . getEncodedSyntacticClassifications ( file , args ) ;
887+ }
888+
884889 private getEncodedSemanticClassifications ( args : protocol . EncodedSemanticClassificationsRequestArgs ) {
885890 const { file, project } = this . getFileAndProject ( args ) ;
886891 return project . getLanguageService ( ) . getEncodedSemanticClassifications ( file , args ) ;
@@ -2299,6 +2304,9 @@ namespace ts.server {
22992304 [ CommandNames . CompilerOptionsDiagnosticsFull ] : ( request : protocol . CompilerOptionsDiagnosticsRequest ) => {
23002305 return this . requiredResponse ( this . getCompilerOptionsDiagnostics ( request . arguments ) ) ;
23012306 } ,
2307+ [ CommandNames . EncodedSyntacticClassificationsFull ] : ( request : protocol . EncodedSyntacticClassificationsRequest ) => {
2308+ return this . requiredResponse ( this . getEncodedSyntacticClassifications ( request . arguments ) ) ;
2309+ } ,
23022310 [ CommandNames . EncodedSemanticClassificationsFull ] : ( request : protocol . EncodedSemanticClassificationsRequest ) => {
23032311 return this . requiredResponse ( this . getEncodedSemanticClassifications ( request . arguments ) ) ;
23042312 } ,
Original file line number Diff line number Diff line change @@ -6415,19 +6415,6 @@ declare namespace ts.server.protocol {
64156415 */
64166416 body ?: string [ ] ;
64176417 }
6418- /**
6419- * Arguments for EncodedSemanticClassificationsRequest request.
6420- */
6421- interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs {
6422- /**
6423- * Start position of the span.
6424- */
6425- start : number ;
6426- /**
6427- * Length of the span.
6428- */
6429- length : number ;
6430- }
64316418 /**
64326419 * Arguments in document highlight request; include: filesToSearch, file,
64336420 * line, offset.
@@ -9076,6 +9063,7 @@ declare namespace ts.server {
90769063 private updateErrorCheck ;
90779064 private cleanProjects ;
90789065 private cleanup ;
9066+ private getEncodedSyntacticClassifications ;
90799067 private getEncodedSemanticClassifications ;
90809068 private getProject ;
90819069 private getConfigFileAndProject ;
You can’t perform that action at this time.
0 commit comments