From 68aad1b85e57f48b34ab2add6d5424dc17fa355a Mon Sep 17 00:00:00 2001 From: uniqueiniquity Date: Tue, 16 Jan 2018 09:50:14 -0800 Subject: [PATCH] Normalize triple slash reference paths at resolve time --- src/compiler/program.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 0d1bbf233a3..8f3cadcddc5 100755 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -15,7 +15,8 @@ namespace ts { export function resolveTripleslashReference(moduleName: string, containingFile: string): string { const basePath = getDirectoryPath(containingFile); - const referencedFileName = isRootedDiskPath(moduleName) ? moduleName : combinePaths(basePath, moduleName); + const normalizedModuleName = normalizePath(moduleName); + const referencedFileName = isRootedDiskPath(normalizedModuleName) ? normalizedModuleName : combinePaths(basePath, normalizedModuleName); return normalizePath(referencedFileName); }