Skip to content

Commit 0acb609

Browse files
committed
[TS] Allow access to enum variant classes in internal files
This allows our own code to do things like `(a instanceof Option_ThingZ_Some)`, though it doesn't impact the public API.
1 parent cb94d3f commit 0acb609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typescript_strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ def map_complex_enum(self, struct_name, variant_list, camel_to_snake, enum_doc_c
14641464
out_java += self.fn_call_body(fn_name, field_map.c_ty, field_map.java_ty, "ptr: bigint", "ptr")
14651465
out_java_enum += java_hu_class
14661466
self.struct_file_suffixes[java_hu_type] = java_hu_subclasses
1467-
self.obj_defined([java_hu_type], "structs")
1467+
self.obj_defined([java_hu_type] + [java_hu_type + "_" + var.var_name for var in variant_list], "structs")
14681468
return (out_java, out_java_enum, out_c)
14691469

14701470
def map_opaque_struct(self, struct_name, struct_doc_comment):

0 commit comments

Comments
 (0)