Update auto-generated TypeScript files
[ldk-java] / typescript_strings.py
index b2a1d5286a00e6ecc57f1f71bcd6dd1d11d75a59..e995ab0c49d2832cc8872bcd03481328fcdad999 100644 (file)
@@ -548,6 +548,9 @@ const decodeString = (stringPointer, free = true) => {
     def init_str(self):
         return ""
 
+    def constr_hu_array(self, ty_info, arr_len):
+        return "new Array(" + arr_len + ").fill(null)"
+
     def var_decl_statement(self, ty_string, var_name, statement):
         return "const " + var_name + ": " + ty_string + " = " + statement
 
@@ -1011,12 +1014,12 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{
     def map_opaque_struct(self, struct_name, struct_doc_comment):
         implementations = ""
         method_header = ""
-        if struct_name.startswith("LDKLocked"):
-            return "NOT IMPLEMENTED"
 
         hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "")
-        out_opaque_struct_human = f"""{self.hu_struct_file_prefix}
-
+        out_opaque_struct_human = f"{self.hu_struct_file_prefix}"
+        if struct_name.startswith("LDKLocked"):
+            out_opaque_struct_human += "/** XXX: DO NOT USE THIS - it remains locked until the GC runs (if that ever happens */"
+        out_opaque_struct_human += f"""
 export class {hu_name} extends CommonBase {implementations}{{
        /* @internal */
        public constructor(_dummy: object, ptr: number) {{