Skip to content

Commit d16aa30

Browse files
author
Andy
authored
Merge pull request #12089 from Microsoft/lshost_realpath
Add `realpath` implementation for lshost
2 parents ed4fead + d5c6731 commit d16aa30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/server/lsHost.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace ts.server {
1313

1414
private readonly resolveModuleName: typeof resolveModuleName;
1515
readonly trace: (s: string) => void;
16+
readonly realpath?: (path: string) => string;
1617

1718
constructor(private readonly host: ServerHost, private readonly project: Project, private readonly cancellationToken: HostCancellationToken) {
1819
this.getCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
@@ -39,6 +40,10 @@ namespace ts.server {
3940
}
4041
return primaryResult;
4142
};
43+
44+
if (this.host.realpath) {
45+
this.realpath = path => this.host.realpath(path);
46+
}
4247
}
4348

4449
public startRecordingFilesWithChangedResolutions() {

0 commit comments

Comments
 (0)