mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #5759 from Microsoft/bangInModuleNames
do not treat modules with '!' in names any specially
This commit is contained in:
@@ -1028,16 +1028,12 @@ namespace ts {
|
||||
|
||||
// Module names are escaped in our symbol table. However, string literal values aren't.
|
||||
// Escape the name in the "require(...)" clause to ensure we find the right symbol.
|
||||
let moduleName = escapeIdentifier(moduleReferenceLiteral.text);
|
||||
const moduleName = escapeIdentifier(moduleReferenceLiteral.text);
|
||||
|
||||
if (moduleName === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (moduleName.indexOf("!") >= 0) {
|
||||
moduleName = moduleName.substr(0, moduleName.indexOf("!"));
|
||||
}
|
||||
|
||||
const isRelative = isExternalModuleNameRelative(moduleName);
|
||||
if (!isRelative) {
|
||||
const symbol = getSymbol(globals, "\"" + moduleName + "\"", SymbolFlags.ValueModule);
|
||||
|
||||
Reference in New Issue
Block a user