Skip to content

Commit 0f498de

Browse files
author
Matt
committed
Cut: ES2015 rest parameter emit when rest parameter declaration
"NodeCheckFlags.EmitRestParam" flag is not set.
1 parent b0b6a1c commit 0f498de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/transformers/es2015.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ namespace ts {
13421342
* synthesized call to `super`
13431343
*/
13441344
function shouldAddRestParameter(node: ParameterDeclaration, inConstructorWithSynthesizedSuper: boolean) {
1345-
return node && node.dotDotDotToken && node.name.kind === SyntaxKind.Identifier && !inConstructorWithSynthesizedSuper;
1345+
return node && node.dotDotDotToken && node.name.kind === SyntaxKind.Identifier && !inConstructorWithSynthesizedSuper && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitRestParam;
13461346
}
13471347

13481348
/**

0 commit comments

Comments
 (0)