mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Merge pull request #94 from ashleygwilliams/node-modules
feat(enum): object.freeze the enum
This commit is contained in:
commit
47da3a38a8
@ -1573,9 +1573,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
enum_string.push_str(&export);
|
||||
enum_string
|
||||
} else {
|
||||
let mut enum_string = format!("export const {} = {{", enum_.name);
|
||||
let mut enum_string = format!("export const {} = Object.freeze({{", enum_.name);
|
||||
enum_string.push_str(&variants);
|
||||
enum_string.push_str("}\n");
|
||||
enum_string.push_str("})\n");
|
||||
enum_string
|
||||
};
|
||||
self.cx.globals.push_str(&global_export);
|
||||
|
Loading…
x
Reference in New Issue
Block a user