aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Niles Salter <Validark@pm.me> 2022-11-07 22:10:19 -0700
committerGravatar GitHub <noreply@github.com> 2022-11-07 21:10:19 -0800
commit093fe1bae9656bc11f77b420dee294f0ac38a011 (patch)
tree163e4bf08e167dce2709e6a957b0abfe5fe2f7c0
parent9dc3fbcfc44def2f8e916708d67b7fc98368cce1 (diff)
downloadbun-093fe1bae9656bc11f77b420dee294f0ac38a011.tar.gz
bun-093fe1bae9656bc11f77b420dee294f0ac38a011.tar.zst
bun-093fe1bae9656bc11f77b420dee294f0ac38a011.zip
Add more tags to be usable with typeof (#1258)
-rw-r--r--src/js_ast.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js_ast.zig b/src/js_ast.zig
index 4ae5e5915..0bd73c93f 100644
--- a/src/js_ast.zig
+++ b/src/js_ast.zig
@@ -2950,13 +2950,13 @@ pub const Expr = struct {
pub fn typeof(tag: Tag) ?string {
return switch (tag) {
- .e_null => "object",
+ .e_array, .e_object, .e_null, .e_reg_exp => "object",
.e_undefined => "undefined",
.e_boolean => "boolean",
.e_number => "number",
.e_big_int => "bigint",
.e_string => "string",
- .e_function, .e_arrow => "function",
+ .e_class, .e_function, .e_arrow => "function",
else => null,
};
}