You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King III (JIRA)" <ji...@apache.org> on 2018/12/17 15:01:00 UTC

[jira] [Commented] (THRIFT-3872) thrift.d.ts is incomplete

    [ https://issues.apache.org/jira/browse/THRIFT-3872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16723046#comment-16723046 ] 

James E. King III commented on THRIFT-3872:
-------------------------------------------

[~bgedik] does THRIFT-3143 obsolete this?

> thrift.d.ts is incomplete
> -------------------------
>
>                 Key: THRIFT-3872
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3872
>             Project: Thrift
>          Issue Type: Bug
>          Components: TypeScript - Library
>    Affects Versions: 0.9.3
>         Environment: any
>            Reporter: Markus W.
>            Priority: Major
>
> The type definitions at [thrift.d.ts|https://github.com/apache/thrift/blob/master/lib/ts/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?
> {code:javascript}
> 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();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)