File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3308,6 +3308,11 @@ namespace ts {
3308
3308
transformFlags |= TransformFlags . AssertTypeScript ;
3309
3309
}
3310
3310
3311
+ // Hoisted variables related to class properties should live within the TypeScript class wrapper.
3312
+ if ( isComputedPropertyName ( node . name ) || ( hasStaticModifier ( node ) && node . initializer ) ) {
3313
+ transformFlags |= TransformFlags . ContainsTypeScriptClassSyntax ;
3314
+ }
3315
+
3311
3316
node . transformFlags = transformFlags | TransformFlags . HasComputedFlags ;
3312
3317
return transformFlags & ~ TransformFlags . NodeExcludes ;
3313
3318
}
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