Mike Morton created THRIFT-4257:
-----------------------------------

             Summary: Typescript async callbacks do not provide the correct 
types
                 Key: THRIFT-4257
                 URL: https://issues.apache.org/jira/browse/THRIFT-4257
             Project: Thrift
          Issue Type: Bug
          Components: JavaScript - Compiler, TypeScript - Library
            Reporter: Mike Morton


The aysnc callbacks provided for typescript do not provide complete information 
for the objects being returned.  Example: 

{code}
  GetOwnInfo(): UserInfo;
  GetOwnInfo(callback: Function): JQueryXHR;
{code}

Both the Function and JQueryXHR do not provide type information about UserInfo. 
 

The proposed fix is to have it generate the following:


{code}
  GetOwnInfo(): UserInfo;
  GetOwnInfo(callback: (data: UserInfo)=>void): JQueryPromise<UserInfo>;
{code}

I have submitted a pull request here: https://github.com/apache/thrift/pull/1310



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to