anthonyalayo commented on PR #2741:
URL: https://github.com/apache/thrift/pull/2741#issuecomment-1435955811

   @cwe-dixa is there a way I can use this in the javascript/typescript world? 
I currently have some serialized thrift strings, and I would like to 
deserialize them with their enums readable. 
   
   I tried the following:
   ```
   export function read(ThriftClass: any, buffer: Buffer): string {
     const client = new ThriftClass();
     const transport = new thrift.TFramedTransport(buffer);
     const protocol = new thrift.TCompactProtocol(transport);
   
     client.read(protocol);
   
     return client;
   ```
   
   But this causes all enums to be I32. Even though the types in the .d.ts 
files are there, the javascript doesn't do anything with them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to