mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Remove unused
This commit is contained in:
parent
c1630e59d1
commit
924a2bf03d
@ -1932,5 +1932,5 @@ namespace Harness {
|
||||
return { unitName: libFile, content: io.readFile(libFile) };
|
||||
}
|
||||
|
||||
if (Error) (<any>Error).stackTraceLimit = 1;
|
||||
if (Error) (<any>Error).stackTraceLimit = 25;
|
||||
}
|
||||
|
||||
@ -218,6 +218,9 @@ namespace Harness.LanguageService {
|
||||
const snapshot = this.getScriptSnapshot(path);
|
||||
return snapshot.getText(0, snapshot.getLength());
|
||||
}
|
||||
getTypeRootsVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
log(s: string): void { }
|
||||
@ -367,7 +370,7 @@ namespace Harness.LanguageService {
|
||||
function unwrapJSONCallResult(result: string): any {
|
||||
const parsedResult = JSON.parse(result);
|
||||
if (parsedResult.error) {
|
||||
throw new Error("Language Service Shim Error: " + JSON.stringify(parsedResult.error));
|
||||
throw new Error("Language Service Shim Error: " + JSON.stringify(parsedResult));
|
||||
}
|
||||
else if (parsedResult.canceled) {
|
||||
throw new ts.OperationCanceledException();
|
||||
|
||||
@ -416,7 +416,7 @@ namespace ts.server {
|
||||
// it is not likely to affect the project for other files opened by the client. We can
|
||||
// just update the current project.
|
||||
|
||||
this.logger.info('Updating configured project');
|
||||
this.logger.info("Updating configured project");
|
||||
this.updateConfiguredProject(project);
|
||||
|
||||
// Call refreshInferredProjects to clean up inferred projects we may have
|
||||
|
||||
@ -216,10 +216,6 @@ namespace ts.server {
|
||||
* true if config file explicitly listed files
|
||||
**/
|
||||
configHasFilesProperty?: boolean;
|
||||
/**
|
||||
* true if config file explicitly listed type names
|
||||
**/
|
||||
configHasTypesProperty?: boolean;
|
||||
/**
|
||||
* these fields can be present in the project file
|
||||
**/
|
||||
|
||||
@ -1188,7 +1188,7 @@ namespace ts {
|
||||
/*
|
||||
* LS host can optionally implement these methods to support automatic updating when new type libraries are installed
|
||||
*/
|
||||
getTypeRootsVersion?(): number;
|
||||
getTypeRootsVersion(): number;
|
||||
|
||||
/*
|
||||
* 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 {
|
||||
|
||||
const typeRootsVersion = host.getTypeRootsVersion ? host.getTypeRootsVersion() : 0;
|
||||
if (lastTypesRootVersion !== typeRootsVersion) {
|
||||
log('TypeRoots version has changed; provide new program');
|
||||
log("TypeRoots version has changed; provide new program");
|
||||
program = undefined;
|
||||
lastTypesRootVersion = typeRootsVersion;
|
||||
}
|
||||
|
||||
@ -360,6 +360,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
public getTypeRootsVersion(): number {
|
||||
if (!this.shimHost.getTypeRootsVersion) {
|
||||
return 0;
|
||||
}
|
||||
return this.shimHost.getTypeRootsVersion();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user