mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-13 23:56:06 +00:00
give 2 space indentations to each enum variant
This commit is contained in:
parent
a1995cafd4
commit
6e2f10440e
@ -2573,12 +2573,12 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
|||||||
.typescript
|
.typescript
|
||||||
.push_str(&format!("export enum {} {{", enum_.name));
|
.push_str(&format!("export enum {} {{", enum_.name));
|
||||||
|
|
||||||
variants.clear();
|
|
||||||
for variant in enum_.variants.iter() {
|
for variant in enum_.variants.iter() {
|
||||||
variants.push_str(&format!("{},", variant.name));
|
self.cx
|
||||||
|
.typescript
|
||||||
|
.push_str(&format!("\n {},", variant.name));
|
||||||
}
|
}
|
||||||
self.cx.typescript.push_str(&variants);
|
self.cx.typescript.push_str("\n}\n");
|
||||||
self.cx.typescript.push_str("}\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate_struct(&mut self, struct_: &decode::Struct) -> Result<(), Error> {
|
fn generate_struct(&mut self, struct_: &decode::Struct) -> Result<(), Error> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user