I have a question regarding using code generated for javascript with flatbuffers.
Now I have item.fbs
and itemManager.fbs
which contains a table
including a vector of item.fbs
. And it generated 2 js files. When using the itemManager in js, it would throw error of not finding item
constructor events.js:163 Uncaught TypeError: my.namespace.Item is not a constructor
. I didn' t find any code regarding importing item_generated.js
in item_manager_generated.js
. I' m wondering how to use it properly in ES6 (with the template of https://github.com/SimulatedGREG/electron-vue) ? Declaring both item
and itemManager
in a single flatbuffers file and import this file works well.
I workaround this by using the --gen-all
flag when using flatc
to compile the schema files for now.