Updated FB import (#6019)

Previous FB import was based on the original early TS implementation
and did not take into accout NPM. There doesn't seem to be a use
for current implemenentation anymore, while NPM compatibility is
needed.

Co-authored-by: Kamil Rojewski <kamil.rojewski@gmail.com>
This commit is contained in:
Kamil Rojewski
2020-07-02 21:44:55 +02:00
committed by GitHub
parent b69fc8cc95
commit 36fbe6f13e

View File

@@ -214,7 +214,7 @@ class JsTsGenerator : public BaseGenerator {
++it) {
if (lang_.language == IDLOptions::kTs) {
if (it->find('.') == std::string::npos) {
code += "import { flatbuffers } from \"./flatbuffers\"\n";
code += "import * as flatbuffers from 'flatbuffers';\n";
break;
}
} else {