aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/js_parser.zig')
-rw-r--r--src/js_parser.zig11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig
index c20300daa..ee54a892a 100644
--- a/src/js_parser.zig
+++ b/src/js_parser.zig
@@ -16935,12 +16935,13 @@ fn NewParser_(
) []Stmt {
switch (stmtorexpr) {
.stmt => |stmt| {
- if (!stmt.data.s_class.class.has_decorators) {
- var stmts = p.allocator.alloc(Stmt, 1) catch unreachable;
- stmts[0] = stmt;
- return stmts;
+ if (comptime !is_typescript_enabled) {
+ if (!stmt.data.s_class.class.has_decorators) {
+ var stmts = p.allocator.alloc(Stmt, 1) catch unreachable;
+ stmts[0] = stmt;
+ return stmts;
+ }
}
-
var class = &stmt.data.s_class.class;
var constructor_function: ?*E.Function = null;