Add getCurrentDirectory and getDefaultLibFilename into interface for host

This commit is contained in:
Yui T 2014-09-16 13:19:49 -07:00
parent 94723a9ad1
commit 54dcf39674
3 changed files with 20 additions and 0 deletions

View File

@ -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); });

View File

@ -417,6 +417,8 @@ module ts {
getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot;
getLocalizedDiagnosticMessages(): any;
getCancellationToken(): CancellationToken;
getCurrentDirectory(): string;
getDefaultLibFilename(): string;
}
//

View File

@ -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 {