File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3276,6 +3276,11 @@ namespace ts {
3276
3276
transformFlags |= TransformFlags . AssertTypeScript ;
3277
3277
}
3278
3278
3279
+ // Hoisted variables related to class properties should live within the TypeScript class wrapper.
3280
+ if ( isComputedPropertyName ( node . name ) || ( hasStaticModifier ( node ) && node . initializer ) ) {
3281
+ transformFlags |= TransformFlags . ContainsTypeScriptClassSyntax ;
3282
+ }
3283
+
3279
3284
node . transformFlags = transformFlags | TransformFlags . HasComputedFlags ;
3280
3285
return transformFlags & ~ TransformFlags . NodeExcludes ;
3281
3286
}
Original file line number Diff line number Diff line change @@ -1257,7 +1257,7 @@ namespace ts {
1257
1257
}
1258
1258
1259
1259
function substitutePropertyAccessExpression ( node : PropertyAccessExpression ) {
1260
- if ( node . expression . kind === SyntaxKind . SuperKeyword ) {
1260
+ if ( enclosingSuperContainerFlags && node . expression . kind === SyntaxKind . SuperKeyword ) {
1261
1261
return setTextRange (
1262
1262
createPropertyAccess (
1263
1263
createFileLevelUniqueName ( "_super" ) ,
@@ -1269,7 +1269,7 @@ namespace ts {
1269
1269
}
1270
1270
1271
1271
function substituteElementAccessExpression ( node : ElementAccessExpression ) {
1272
- if ( node . expression . kind === SyntaxKind . SuperKeyword ) {
1272
+ if ( enclosingSuperContainerFlags && node . expression . kind === SyntaxKind . SuperKeyword ) {
1273
1273
return createSuperElementAccessInAsyncMethod (
1274
1274
node . argumentExpression ,
1275
1275
node
You can’t perform that action at this time.
0 commit comments