Skip to content

Commit a63b52d

Browse files
author
Joseph Watts
committed
Revert unnecessary changes
Signed-off-by: Joseph Watts <[email protected]>
1 parent e2ce860 commit a63b52d

File tree

1 file changed

+2
-2
lines changed
  • src/compiler/transformers

1 file changed

+2
-2
lines changed

src/compiler/transformers/ts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ namespace ts {
973973
// Check if we have property assignment inside class declaration.
974974
// If there is a property assignment, we need to emit constructor whether users define it or not
975975
// If there is no property assignment, we can omit constructor if users do not define it
976-
const hasInstancePropertyWithInitializer = forEach(node.members, member => isInstanceInitializedProperty(member));
976+
const hasInstancePropertyWithInitializer = forEach(node.members, isInstanceInitializedProperty);
977977
const hasParameterPropertyAssignments = node.transformFlags & TransformFlags.ContainsParameterPropertyAssignments;
978978
const constructor = getFirstConstructorWithBody(node);
979979

@@ -1242,7 +1242,7 @@ namespace ts {
12421242
*/
12431243
function addInitializedPropertyStatements(statements: Statement[], properties: ReadonlyArray<PropertyDeclaration>, receiver: LeftHandSideExpression) {
12441244
for (const property of properties) {
1245-
const statement = createStatement(transformInitializedProperty(property, receiver));
1245+
const statement = createExpressionStatement(transformInitializedProperty(property, receiver));
12461246
setSourceMapRange(statement, moveRangePastModifiers(property));
12471247
setCommentRange(statement, property);
12481248
setOriginalNode(statement, property);

0 commit comments

Comments
 (0)