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

Typescript async callbacks do not provide the correct types

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

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

        GetOwnInfo(): UserInfo;
        GetOwnInfo(callback: Function): JQueryXHR;
      

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

      The proposed fix is to have it generate the following:

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

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

      Attachments

        Issue Links

          Activity

            People

              mikemorton Mike Morton
              mmorton Mike Morton
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: