Co-authored-by: Kamil Rojewski <kamil.rojewski@gmail.com>
Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
**/Package.resolved
.clangd/**
package-lock.json
-.clwb
\ No newline at end of file
+/*.ilk
+/*.pdb
+.clwb
// Emit namespaces in a form that Closure Compiler can optimize
std::string &code = *code_ptr;
std::string &exports = *exports_ptr;
+
+ if (lang_.language == IDLOptions::kTs) {
+ code += "import * as flatbuffers from 'flatbuffers';\n";
+ }
+
for (auto it = sorted_namespaces.begin(); it != sorted_namespaces.end();
++it) {
if (lang_.language == IDLOptions::kTs) {
if (it->find('.') == std::string::npos) {
- code += "import * as flatbuffers from 'flatbuffers';\n";
break;
}
} else {
// automatically generated by the FlatBuffers compiler, do not modify
+import * as flatbuffers from 'flatbuffers';
/**
* @enum {number}
*/