diff --git a/packages/language-service/src/reflector_host.ts b/packages/language-service/src/reflector_host.ts index 5e60375e6e..13ba23a885 100644 --- a/packages/language-service/src/reflector_host.ts +++ b/packages/language-service/src/reflector_host.ts @@ -19,6 +19,8 @@ class ReflectorModuleModuleResolutionHost implements ts.ModuleResolutionHost, Me }); readonly directoryExists?: (directoryName: string) => boolean; + // Resolve a symbolic link. + realpath?: (path: string) => string; constructor( private readonly tsLSHost: ts.LanguageServiceHost, @@ -26,6 +28,9 @@ class ReflectorModuleModuleResolutionHost implements ts.ModuleResolutionHost, Me if (tsLSHost.directoryExists) { this.directoryExists = directoryName => tsLSHost.directoryExists !(directoryName); } + if (tsLSHost.realpath) { + this.realpath = path => tsLSHost.realpath !(path); + } } fileExists(fileName: string): boolean {