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 2017/12/14 13:55:19 UTC

[jira] [Closed] (THRIFT-4257) Typescript async callbacks do not provide the correct types

     [ https://issues.apache.org/jira/browse/THRIFT-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James E. King, III closed THRIFT-4257.
--------------------------------------

> 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
>            Reporter: Mike Morton
>            Assignee: Mike Morton
>              Labels: TypeScript
>             Fix For: 0.11.0
>
>
> 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)