Skip to content

Commit ca0aed5

Browse files
committed
Add a warning for Locked human objects as they are not usable yet
1 parent 7b5efec commit ca0aed5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

typescript_strings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,12 +1014,12 @@ def map_complex_enum(self, struct_name, variant_list, camel_to_snake, enum_doc_c
10141014
def map_opaque_struct(self, struct_name, struct_doc_comment):
10151015
implementations = ""
10161016
method_header = ""
1017-
if struct_name.startswith("LDKLocked"):
1018-
return "NOT IMPLEMENTED"
10191017

10201018
hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "")
1021-
out_opaque_struct_human = f"""{self.hu_struct_file_prefix}
1022-
1019+
out_opaque_struct_human = f"{self.hu_struct_file_prefix}"
1020+
if struct_name.startswith("LDKLocked"):
1021+
out_opaque_struct_human += "/** XXX: DO NOT USE THIS - it remains locked until the GC runs (if that ever happens */"
1022+
out_opaque_struct_human += f"""
10231023
export class {hu_name} extends CommonBase {implementations}{{
10241024
/* @internal */
10251025
public constructor(_dummy: object, ptr: number) {{

0 commit comments

Comments
 (0)