From 54dcf396744b33a716db40034f4e17f72bb4d852 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 16 Sep 2014 13:19:49 -0700 Subject: [PATCH] Add getCurrentDirectory and getDefaultLibFilename into interface for host --- src/harness/harnessLanguageService.ts | 8 ++++++++ src/services/services.ts | 2 ++ src/services/shims.ts | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 03c3436f9d5..647d0729cbb 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -207,6 +207,14 @@ module Harness.LanguageService { return this.cancellationToken; } + public getCurrentDirectory(): string { + return ""; + } + + public getDefaultLibFilename(): string { + return ""; + } + public getScriptFileNames(): string { var fileNames: string[] = []; ts.forEachKey(this.fileNameToScript, (fileName) => { fileNames.push(fileName); }); diff --git a/src/services/services.ts b/src/services/services.ts index 15929f18402..a5363eaa802 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -417,6 +417,8 @@ module ts { getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot; getLocalizedDiagnosticMessages(): any; getCancellationToken(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(): string; } // diff --git a/src/services/shims.ts b/src/services/shims.ts index ba7c73d87e3..5145ed96d24 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -53,6 +53,8 @@ module ts { getScriptSnapshot(fileName: string): ScriptSnapshotShim; getLocalizedDiagnosticMessages(): string; getCancellationToken(): CancellationToken; + getCurrentDirectory(): string; + getDefaultLibFilename(): string; } // @@ -365,6 +367,14 @@ module ts { public getCancellationToken(): CancellationToken { return this.shimHost.getCancellationToken(); } + + public getDefaultLibFilename(): string { + return this.shimHost.getDefaultLibFilename(); + } + + public getCurrentDirectory(): string { + return this.shimHost.getCurrentDirectory(); + } } function simpleForwardCall(logger: Logger, actionDescription: string, action: () => any): any {