Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

importing flatbuffers correctly with typescript

$
0
0

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?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>