Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3872

thrift.d.ts is incomplete

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.3
    • None
    • TypeScript - Library
    • 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();
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            daixtrose Markus W.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: