Add utitlity for stringContains

This commit is contained in:
Sheetal Nandi committed 2017-10-10 17:16:39 -07:00
1 parent aa22c56282
commit e30a66d22f
12 files changed
+18 -15

No files matched your search

+1 -1
View File
@@ -1061,7 +1061,7 @@ namespace ts {
export function getPackageNameFromAtTypesDirectory(mangledName: string): string {
const withoutAtTypePrefix = removePrefix(mangledName, "@types/");
if (withoutAtTypePrefix !== mangledName) {
return withoutAtTypePrefix.indexOf(mangledScopedPackageSeparator) !== -1 ?
return stringContains(withoutAtTypePrefix, mangledScopedPackageSeparator) ?
"@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) :
withoutAtTypePrefix;
}