X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=typescript_strings.py;h=be200406245e6b638e73296f0f6fc2a6f8989f41;hp=01fea9ddd4281d68cee54efd348ca119c784758b;hb=ec1a09b7537270af77128e1b3ffd1fd7936daa1f;hpb=06f1371c84e786b35f649c02738e214b6c38709f diff --git a/typescript_strings.py b/typescript_strings.py index 01fea9dd..be200406 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -505,6 +505,9 @@ const decodeString = (stringPointer, free = true) => { def init_str(self): return "" + def var_decl_statement(self, ty_string, var_name, statement): + return "const " + var_name + ": " + ty_string + " = " + statement + def native_c_unitary_enum_map(self, struct_name, variants, enum_doc_comment): out_c = "static inline LDK" + struct_name + " LDK" + struct_name + "_from_js(int32_t ord) {\n" out_c = out_c + "\tswitch (ord) {\n"