[ 
https://issues.apache.org/jira/browse/THRIFT-4653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663054#comment-16663054
 ] 

ASF GitHub Bot commented on THRIFT-4653:
----------------------------------------

jeking3 commented on a change in pull request #1615: THRIFT-4653: ES6 classes 
support
URL: https://github.com/apache/thrift/pull/1615#discussion_r228004233
 
 

 ##########
 File path: lib/nodejs/test/server.js
 ##########
 @@ -19,48 +19,46 @@
  * under the License.
  */
 
-var fs = require('fs');
-var path = require('path');
-var thrift = require('../lib/thrift');
-var program = require('commander');
-var helpers = require('./helpers');
-
-var ThriftTest = require('./gen-nodejs/ThriftTest');
-var SecondService = require('./gen-nodejs/SecondService');
-var ThriftTestHandler = require('./test_handler').AsyncThriftTestHandler;
-var ThriftTestHandlerPromise = require('./test_handler').SyncThriftTestHandler;
-var ttypes = require('./gen-nodejs/ThriftTest_types');
+const fs = require('fs');
+const path = require('path');
+const thrift = require('../lib/thrift');
+const program = require('commander');
+const helpers = require('./helpers');
 
 program
   .option('-p, --protocol <protocol>', 'Set thrift protocol 
(binary|compact|json)', 'binary')
   .option('-t, --transport <transport>', 'Set thrift transport 
(buffered|framed|http)', 'buffered')
   .option('--ssl', 'use ssl transport')
   .option('--port <port>', 'Set thrift server port', 9090)
   .option('--domain-socket <path>', 'Set thift server unix domain socket')
-  .option('--promise', 'test with promise style functions')
   .option('-t, --type <type>', 'Select server type 
(http|multiplex|tcp|websocket)', 'tcp')
+  .option('--callback', 'test with callback style functions')
+  .option('--es6', 'Use es6 code')
+  .option('--es5', 'Use es5 code')
   .parse(process.argv);
 
-var port = program.port;
-var domainSocket = program.domainSocket;
-var type = program.type;
-var ssl = program.ssl;
-var promise = program.promise;
+const ThriftTest = require(`./${helpers.genPath}/ThriftTest`);
+const SecondService = require(`./${helpers.genPath}/SecondService`);
+const { ThriftTestHandler } = require('./test_handler');
 
-var handler = program.promise ? ThriftTestHandler : ThriftTestHandlerPromise;
+
+const port = program.port;
+const domainSocket = program.domainSocket;
+const type = program.type;
 
 Review comment:
   This is breaking the builds.  See line 52.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> ES6 Classes
> -----------
>
>                 Key: THRIFT-4653
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4653
>             Project: Thrift
>          Issue Type: Improvement
>          Components: JavaScript - Compiler, Node.js - Compiler
>            Reporter: Brian Forbis
>            Priority: Minor
>
> Updating the generated code to generate ES6 classes when using the es6 
> compiler option. ES6 classes should be a drop in replacement for manual ES5 
> prototypical inheritance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to