In typescript I am using flatbuffers like this:
import {flatbuffers} from 'flatbuffers';const builder = new flatbuffers.Builder(1);
then I compile to js to be use with react-native:
const flatbuffers_1 = require("flatbuffers");const builder = new flatbuffers_1.flatbuffers.Builder(1);
but I get error:
undefined is not an object (evaluating 'new flatbuffers_1.flatbuffers.Builder')
What happen?