Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.9.3
-
None
-
None
-
any
Description
The type definitions at thrift.d.ts do not expose all aspects of Apache Thrift. Especially if you only want to use the serialization features of Thrift, these are not accessible immediately. Is there a possibility to add the definitions necessary to port the following code to typescript?
var thrift = require('thrift'); var TFramedTransport = thrift.TFramedTransport; var TBufferedTransport = thrift.TBufferedTransport; var TBinaryProtocol = thrift.TBinaryProtocol; var send_data_mdc = function (...) { // mdc is a class generated by the Thrift compiler var mdc = create_measurement_data_chunk(); var transport = new TFramedTransport(null, msg => { // send using another system, i.e. socket.io }); var binaryProt = new TBinaryProtocol(transport); mdc.write(binaryProt); transport.flush(); }