From aa04ef5ce7580c7d16167ca7cc9023ae370ef4e9 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 20 Aug 2018 20:49:52 -0700 Subject: [PATCH] Adjust subModuleName --- src/compiler/moduleNameResolver.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index bd532e6dd01..21ff919872b 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -934,7 +934,7 @@ namespace ts { if (endsWith(path, ".d.ts")) { return path; } - if (endsWith(path, "/index")) { + if (path === "index" || endsWith(path, "/index")) { return path + ".d.ts"; } return path + "/index.d.ts"; @@ -1069,9 +1069,9 @@ namespace ts { } } - // if (versionPath) { - // subModuleName = combinePaths(versionPath, subModuleName); - // } + if (versionPath) { + subModuleName = combinePaths(versionPath, subModuleName); + } if (!endsWith(subModuleName, Extension.Dts)) { subModuleName = addExtensionAndIndex(subModuleName);