You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TypeScript constructors are transformed in `visitClassDeclaration`.
144
-
// We elide them here as `visitorWorker` checks transform flags, which could
145
-
// erronously include an ES6 constructor without ESNext syntax.
146
+
// Constructors for classes using ESNext syntax (like class properties)
147
+
// are transformed in `visitClassDeclaration` or `visitClassExpression`.
148
+
// We elide them here. The default visitor checks the transformFlags to
149
+
// determine whether the node contains ESNext syntax, so it can skip over
150
+
// constructors.
146
151
returnundefined;
147
152
148
153
caseSyntaxKind.PropertyDeclaration:
@@ -164,9 +169,8 @@ namespace ts {
164
169
* If the name is a computed property, this function transforms it, then either returns an expression which caches the
165
170
* value of the result or the expression itself if the value is either unused or safe to inline into multiple locations
166
171
* @param shouldHoist Does the expression need to be reused? (ie, for an initializer or a decorator)
167
-
* @param omitSimple Should expressions with no observable side-effects be elided? (ie, the expression is not hoisted for a decorator or initializer and is a literal)
0 commit comments