Add deserialization/init helper class that overtorment asked for
[ldk-java] / typescript_strings.py
index cb1f3828fc06dd4211043435082216d1992d663c..542487bc463fca2ff6b3e945f5c58fcb6c535a75 100644 (file)
@@ -82,6 +82,9 @@ public static native long new_empty_slice_vec();
         }
         """
 
+        self.util_fn_pfx = ""
+        self.util_fn_sfx = ""
+
         self.common_base = """
             export default class CommonBase {
                 ptr: number;
@@ -1053,9 +1056,9 @@ const decodeString = (stringPointer, free = true) => {
                 elif info.from_hu_conv is not None and info.from_hu_conv[1] != "":
                     if not takes_self and return_type_info.to_hu_conv_name is not None:
                         out_java_struct += (
-                                "\t\t" + info.from_hu_conv[1].replace("this", return_type_info.to_hu_conv_name) + ";\n")
+                                "\t\t" + info.from_hu_conv[1].replace("this", return_type_info.to_hu_conv_name).replace("\n", "\n\t\t") + ";\n")
                     else:
-                        out_java_struct += ("\t\t" + info.from_hu_conv[1] + ";\n")
+                        out_java_struct += ("\t\t" + info.from_hu_conv[1].replace("\n", "\n\t\t") + ";\n")
 
             if return_type_info.to_hu_conv_name is not None:
                 out_java_struct += ("\t\treturn " + return_type_info.to_hu_conv_name + ";\n")