Fix some small bugs

This commit is contained in:
Fabian Stamm
2025-05-27 20:31:16 +02:00
parent ffacba2e96
commit c168df8365
9 changed files with 193 additions and 67 deletions

View File

@ -472,7 +472,7 @@ impl Compile for RustCompiler {
}
f.a1(format!(
"pub {}: {}",
"pub {}: {},",
Self::fix_keyword_name(&field.name),
Self::type_to_rust_ext(&field.typ)
));

View File

@ -138,7 +138,7 @@ impl<F: Flavour> TypeScriptCompiler<F> {
) -> Result<()> {
let esm = F::ext();
file.a0(format!(
"import {{ VerificationError, apply_int, apply_float, apply_string, apply_boolean, apply_void, apply_array, apply_required, apply_optional, apply_map }} from \"./ts_base{esm}\""));
"import {{ VerificationError, apply_int, apply_float, apply_string, apply_bool, apply_void, apply_array, apply_required, apply_optional, apply_map }} from \"./ts_base{esm}\""));
for dep in depends {
match dep {
BaseType::Custom(name) => {
@ -222,6 +222,13 @@ impl<F: Flavour> TypeScriptCompiler<F> {
};
}
f.a0(format!("export * as Client from \"./index_client{}\"", esm));
f.a0(format!("export * as Server from \"./index_server{}\"", esm));
f.a0(format!(
"export {{ Logging }} from \"./ts_service_base{}\"",
esm
));
ctx.write_file("index.ts", &f.into_content())?;
ctx.write_file("index_client.ts", &fc.into_content())?;
ctx.write_file("index_server.ts", &fs.into_content())?;