Skip to content

Commit aa04ef5

Browse files
committed
Adjust subModuleName
1 parent 8398a87 commit aa04ef5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/moduleNameResolver.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ namespace ts {
934934
if (endsWith(path, ".d.ts")) {
935935
return path;
936936
}
937-
if (endsWith(path, "/index")) {
937+
if (path === "index" || endsWith(path, "/index")) {
938938
return path + ".d.ts";
939939
}
940940
return path + "/index.d.ts";
@@ -1069,9 +1069,9 @@ namespace ts {
10691069
}
10701070
}
10711071

1072-
// if (versionPath) {
1073-
// subModuleName = combinePaths(versionPath, subModuleName);
1074-
// }
1072+
if (versionPath) {
1073+
subModuleName = combinePaths(versionPath, subModuleName);
1074+
}
10751075

10761076
if (!endsWith(subModuleName, Extension.Dts)) {
10771077
subModuleName = addExtensionAndIndex(subModuleName);

0 commit comments

Comments
 (0)