You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2022/02/18 13:11:00 UTC
[jira] [Commented] (THRIFT-5517) Do not generate callback-style methods in ES6 mode
[ https://issues.apache.org/jira/browse/THRIFT-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494594#comment-17494594 ]
Jens Geyer commented on THRIFT-5517:
------------------------------------
Sounds good to me, I'm only unsure about
* what the best default could be for this (i.e. no switches given)
* if ES6 the only criterion is (or should be) to consider of if should add an extra switch besides es6.
> Do not generate callback-style methods in ES6 mode
> --------------------------------------------------
>
> Key: THRIFT-5517
> URL: https://issues.apache.org/jira/browse/THRIFT-5517
> Project: Thrift
> Issue Type: Improvement
> Components: JavaScript - Compiler
> Affects Versions: 0.16.0
> Reporter: Axel
> Priority: Minor
>
> Currently, when generating a javascript API, both promise-style functions and callback-style functions are generated. An application will likely be using only one of them and when the app is using ES6, it will be Promises. Do not generate callback-style methods in ES6 mode, as it approximately doubles the bundle size.
>
> The actual changes in the generator are rather simple, we are willing to work on this if we get some feedback that other people think this is a good idea.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)