File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2935,16 +2935,14 @@ module ts {
29352935 }
29362936 }
29372937
2938- function shouldEmitFunctionName ( node : Declaration ) : boolean {
2939- // Emit a declaration name for the function iff:
2940- // it is a function expression with a name provided
2941- // it is a function declaration with a name provided
2942- // it is a function declaration is not the default export, and is missing a name (emit a generated name for it)
2938+ function shouldEmitFunctionName ( node : FunctionLikeDeclaration ) {
29432939 if ( node . kind === SyntaxKind . FunctionExpression ) {
2940+ // Emit name if one is present
29442941 return ! ! node . name ;
29452942 }
2946- else if ( node . kind === SyntaxKind . FunctionDeclaration ) {
2947- return ! ! node . name || ( languageVersion >= ScriptTarget . ES6 && ! ( node . flags & NodeFlags . Default ) ) ;
2943+ if ( node . kind === SyntaxKind . FunctionDeclaration ) {
2944+ // Emit name if one is present, or emit generated name in down-level case (for export default case)
2945+ return ! ! node . name || languageVersion < ScriptTarget . ES6 ;
29482946 }
29492947 }
29502948
You can’t perform that action at this time.
0 commit comments