Fix #2929: relax the check for export= in ES6 if it is resulting from an ambient declaration

This commit is contained in:
Mohamed Hegazy
2015-04-27 13:46:45 -07:00
parent 2349a27f92
commit 992bbff5b1
23 changed files with 295 additions and 1 deletions

View File

@@ -10689,7 +10689,7 @@ module ts {
}
checkExternalModuleExports(container);
if (node.isExportEquals) {
if (node.isExportEquals && !isInAmbientContext(node)) {
if (languageVersion >= ScriptTarget.ES6) {
// export assignment is deprecated in es6 or above
grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead);