Skip to content

Commit 219c64a

Browse files
committed
Fix all build errors
1 parent 2b663a8 commit 219c64a

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/harness/fourslashImpl.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,7 @@ namespace FourSlash {
24902490
return [tokenTypes[typeIdx], ...tokenModifiers.filter((_, i) => modSet & 1 << i)].join(".");
24912491
}
24922492

2493-
private verifyClassifications(expected: { classificationType: string | number, text?: string; textSpan?: TextSpan }[], actual: ts.ClassifiedSpan[], sourceFileText: string) {
2493+
private verifyClassifications(expected: { classificationType: string | number, text?: string; textSpan?: TextSpan }[], actual: (ts.ClassifiedSpan | ts.ClassifiedSpan2020)[] , sourceFileText: string) {
24942494
if (actual.length !== expected.length) {
24952495
this.raiseError("verifyClassifications failed - expected total classifications to be " + expected.length +
24962496
", but was " + actual.length +
@@ -2579,7 +2579,6 @@ namespace FourSlash {
25792579
public verifySemanticClassifications(format: ts.SemanticClassificationFormat, expected: { classificationType: string | number; text?: string }[]) {
25802580
const actual = this.languageService.getSemanticClassifications(this.activeFile.fileName,
25812581
ts.createTextSpan(0, this.activeFile.content.length), format);
2582-
25832582
this.verifyClassifications(expected, actual, this.activeFile.content);
25842583
}
25852584

src/services/services.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,8 @@ namespace ts {
17971797
return kind === ScriptKind.TS || kind === ScriptKind.TSX;
17981798
}
17991799

1800-
function getSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): (ClassifiedSpan| ClassifiedSpan2020)[] {
1800+
function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
1801+
function getSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[] {
18011802
if (!isTsOrTsxFile(fileName)) {
18021803
// do not run semantic classification on non-ts-or-tsx files
18031804
return [];
@@ -1829,7 +1830,7 @@ namespace ts {
18291830
}
18301831
}
18311832

1832-
function getSyntacticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[] {
1833+
function getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] {
18331834
// doesn't use compiler - no need to synchronize with host
18341835
return ts.getSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(fileName), span);
18351836
}

src/services/types.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,12 @@ namespace ts {
380380
getCompilerOptionsDiagnostics(): Diagnostic[];
381381

382382
/** @deprecated Use getEncodedSyntacticClassifications instead. */
383-
getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat.TwentyTwenty): ClassifiedSpan2020[];
384-
getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat.Original): ClassifiedSpan[];
385-
getSyntacticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
383+
getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
384+
getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
386385

387386
/** @deprecated Use getEncodedSemanticClassifications instead. */
388-
getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat.TwentyTwenty): ClassifiedSpan2020[];
389-
getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat.Original): ClassifiedSpan[];
390-
getSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
387+
getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
388+
getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[];
391389

392390
/** Encoded as triples of [start, length, ClassificationType]. */
393391
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;

0 commit comments

Comments
 (0)