Open courteous opened 6 years ago
Usually you'd simply add long
and bytebuffer
like so:
npm install long bytebuffer
and use the definitions in development:
npm install --save-dev @types/long @types/bytebuffer
Afterwards, something like import * as ByteBuffer from "bytebuffer"
should just work. Note that these definitions have been created by a 3rd party.
Hello Daniel, many thanks for the quick response. Indeed i forgot to do "npm install long" . Many thanks for the quick feedback.
I am trying to use the ByteBuffer.js in typescript. I have downloaded the typescript definitions i.e. the index.d.ts from
here
and i did the same for the Long.js it all went well except 2 warnings
when i try to execute the following code
I am getting the following two warnings:
if I comment those lines below then the second warning about the long is gone i guess this is the same behaviour explained in the ticket number (#47 opened on May 8, 2015 by jcalfee)
However i do not know what to do with the first warring why is typescript sayng that "export 'allocate' was not found. I guess this have to do with the fact that ByteBuffer.js is ready to be consumed as CommonJS and AMD module but somehow i am missing the es6 modules exports, but i might be wrong. Any ideas about this?