Skip to content

Commit 924a2bf

Browse files
committed
Remove unused
1 parent c1630e5 commit 924a2bf

6 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/harness/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1932,5 +1932,5 @@ namespace Harness {
19321932
return { unitName: libFile, content: io.readFile(libFile) };
19331933
}
19341934

1935-
if (Error) (<any>Error).stackTraceLimit = 1;
1935+
if (Error) (<any>Error).stackTraceLimit = 25;
19361936
}

src/harness/harnessLanguageService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ namespace Harness.LanguageService {
218218
const snapshot = this.getScriptSnapshot(path);
219219
return snapshot.getText(0, snapshot.getLength());
220220
}
221+
getTypeRootsVersion() {
222+
return 0;
223+
}
221224

222225

223226
log(s: string): void { }
@@ -367,7 +370,7 @@ namespace Harness.LanguageService {
367370
function unwrapJSONCallResult(result: string): any {
368371
const parsedResult = JSON.parse(result);
369372
if (parsedResult.error) {
370-
throw new Error("Language Service Shim Error: " + JSON.stringify(parsedResult.error));
373+
throw new Error("Language Service Shim Error: " + JSON.stringify(parsedResult));
371374
}
372375
else if (parsedResult.canceled) {
373376
throw new ts.OperationCanceledException();

src/server/editorServices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ namespace ts.server {
416416
// it is not likely to affect the project for other files opened by the client. We can
417417
// just update the current project.
418418

419-
this.logger.info('Updating configured project');
419+
this.logger.info("Updating configured project");
420420
this.updateConfiguredProject(project);
421421

422422
// Call refreshInferredProjects to clean up inferred projects we may have

src/server/utilities.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,6 @@ namespace ts.server {
216216
* true if config file explicitly listed files
217217
**/
218218
configHasFilesProperty?: boolean;
219-
/**
220-
* true if config file explicitly listed type names
221-
**/
222-
configHasTypesProperty?: boolean;
223219
/**
224220
* these fields can be present in the project file
225221
**/

src/services/services.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ namespace ts {
11881188
/*
11891189
* LS host can optionally implement these methods to support automatic updating when new type libraries are installed
11901190
*/
1191-
getTypeRootsVersion?(): number;
1191+
getTypeRootsVersion(): number;
11921192

11931193
/*
11941194
* LS host can optionally implement this method if it wants to be completely in charge of module name resolution.
@@ -3223,7 +3223,7 @@ namespace ts {
32233223

32243224
const typeRootsVersion = host.getTypeRootsVersion ? host.getTypeRootsVersion() : 0;
32253225
if (lastTypesRootVersion !== typeRootsVersion) {
3226-
log('TypeRoots version has changed; provide new program');
3226+
log("TypeRoots version has changed; provide new program");
32273227
program = undefined;
32283228
lastTypesRootVersion = typeRootsVersion;
32293229
}

src/services/shims.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@ namespace ts {
360360
}
361361

362362
public getTypeRootsVersion(): number {
363+
if (!this.shimHost.getTypeRootsVersion) {
364+
return 0;
365+
}
363366
return this.shimHost.getTypeRootsVersion();
364367
}
365368

0 commit comments

Comments
 (0)