diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 429a1aab805..b66d08bcb5e 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1932,5 +1932,5 @@ namespace Harness { return { unitName: libFile, content: io.readFile(libFile) }; } - if (Error) (Error).stackTraceLimit = 1; + if (Error) (Error).stackTraceLimit = 25; } diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index d73f1b60624..513c6be7ee9 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -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(); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 2ae3f812d43..4718fa36e4d 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -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 diff --git a/src/server/utilities.ts b/src/server/utilities.ts index 1814e5920e2..a7a0160ea62 100644 --- a/src/server/utilities.ts +++ b/src/server/utilities.ts @@ -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 **/ diff --git a/src/services/services.ts b/src/services/services.ts index e369aefa4bd..7ef3a9b0efc 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -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; } diff --git a/src/services/shims.ts b/src/services/shims.ts index e5646254518..f2ee5b44090 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -360,6 +360,9 @@ namespace ts { } public getTypeRootsVersion(): number { + if (!this.shimHost.getTypeRootsVersion) { + return 0; + } return this.shimHost.getTypeRootsVersion(); }