Remove require name collision check for ES6 modules and later

This commit is contained in:
Mohamed Hegazy
2016-09-14 18:01:54 -07:00
parent 21c2c893b9
commit 0ad494cedb
5 changed files with 112 additions and 0 deletions
+5
View File
@@ -15554,6 +15554,11 @@ namespace ts {
}
function checkCollisionWithRequireExportsInGeneratedCode(node: Node, name: Identifier) {
// No need to check for require or exports for ES6 modules and later
if (modulekind >= ModuleKind.ES6) {
return;
}
if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
return;
}