Skip to content

Commit 54dcf39

Browse files
author
Yui T
committed
Add getCurrentDirectory and getDefaultLibFilename into interface for host
1 parent 94723a9 commit 54dcf39

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

src/harness/harnessLanguageService.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ module Harness.LanguageService {
207207
return this.cancellationToken;
208208
}
209209

210+
public getCurrentDirectory(): string {
211+
return "";
212+
}
213+
214+
public getDefaultLibFilename(): string {
215+
return "";
216+
}
217+
210218
public getScriptFileNames(): string {
211219
var fileNames: string[] = [];
212220
ts.forEachKey(this.fileNameToScript, (fileName) => { fileNames.push(fileName); });

src/services/services.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ module ts {
417417
getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot;
418418
getLocalizedDiagnosticMessages(): any;
419419
getCancellationToken(): CancellationToken;
420+
getCurrentDirectory(): string;
421+
getDefaultLibFilename(): string;
420422
}
421423

422424
//

src/services/shims.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ module ts {
5353
getScriptSnapshot(fileName: string): ScriptSnapshotShim;
5454
getLocalizedDiagnosticMessages(): string;
5555
getCancellationToken(): CancellationToken;
56+
getCurrentDirectory(): string;
57+
getDefaultLibFilename(): string;
5658
}
5759

5860
//
@@ -365,6 +367,14 @@ module ts {
365367
public getCancellationToken(): CancellationToken {
366368
return this.shimHost.getCancellationToken();
367369
}
370+
371+
public getDefaultLibFilename(): string {
372+
return this.shimHost.getDefaultLibFilename();
373+
}
374+
375+
public getCurrentDirectory(): string {
376+
return this.shimHost.getCurrentDirectory();
377+
}
368378
}
369379

370380
function simpleForwardCall(logger: Logger, actionDescription: string, action: () => any): any {

0 commit comments

Comments
 (0)