From 1feca22e280d7ef1de732262b2a945c11c09a669 Mon Sep 17 00:00:00 2001 From: spaceface777 Date: Sat, 1 Aug 2020 22:27:25 +0200 Subject: [PATCH] jsgen: don't generate `JS.` struct decls (#6035) --- vlib/v/gen/js/js.v | 1 + 1 file changed, 1 insertion(+) diff --git a/vlib/v/gen/js/js.v b/vlib/v/gen/js/js.v index 391d81c6f5..1a75273c53 100644 --- a/vlib/v/gen/js/js.v +++ b/vlib/v/gen/js/js.v @@ -1045,6 +1045,7 @@ fn (mut g JsGen) gen_hash_stmt(it ast.HashStmt) { } fn (mut g JsGen) gen_struct_decl(node ast.StructDecl) { + if node.name.starts_with('JS.') { return } g.doc.gen_fac_fn(node.fields) g.write('function ${g.js_name(node.name)}({ ') for i, field in node.fields {