WIP-semantic in session based TS (#42438)
This commit is contained in:
parent
63003eb106
commit
154f2094fc
|
@ -861,6 +861,11 @@ namespace ts.server.protocol {
|
|||
* Length of the span.
|
||||
*/
|
||||
length: number;
|
||||
/**
|
||||
* Optional parameter for the semantic highlighting response, if absent it
|
||||
* defaults to "original".
|
||||
*/
|
||||
format?: "original" | "2020"
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1115,7 +1115,8 @@ namespace ts.server {
|
|||
|
||||
private getEncodedSemanticClassifications(args: protocol.EncodedSemanticClassificationsRequestArgs) {
|
||||
const { file, project } = this.getFileAndProject(args);
|
||||
return project.getLanguageService().getEncodedSemanticClassifications(file, args);
|
||||
const format = args.format === "2020" ? SemanticClassificationFormat.TwentyTwenty : SemanticClassificationFormat.Original;
|
||||
return project.getLanguageService().getEncodedSemanticClassifications(file, args, format);
|
||||
}
|
||||
|
||||
private getProject(projectFileName: string | undefined): Project | undefined {
|
||||
|
|
Loading…
Reference in a new issue