Emit generated name for unnamed default exported class with decorated members

This commit is contained in:
Ron Buckton
2017-04-19 14:53:32 -07:00
parent 1d28c88cf8
commit 96927379f0
17 changed files with 235 additions and 1 deletions

View File

@@ -521,9 +521,10 @@ namespace ts {
// emit name if
// - node has a name
// - node has static initializers
// - node has a member that is decorated
//
let name = node.name;
if (!name && staticProperties.length > 0) {
if (!name && (staticProperties.length > 0 || childIsDecorated(node))) {
name = getGeneratedNameForNode(node);
}