You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by J <mv...@gmail.com> on 2015/08/31 14:25:29 UTC

Generating JS client with annotations

Hi, I'm wondering if there's a way to make the thrift compiler generate
annotations (i.e. like
https://developers.google.com/closure/compiler/docs/js-for-compiler) for
the generated JS client code. Alternatively, is there some easy way to
generate externs for the generated JS client code?

Re: Generating JS client with annotations

Posted by Randy Abernethy <ra...@gmail.com>.
Hello,

The Apache Thrift IDL Compiler does have annotation support but presently
there are no IDL annotations implemented which allow you to generate
arbitrary comments or JSDoc Tags. I always thought it would be nice if
comments in IDL were simply emitted as is in the associated output code but
this is easier said than done when one IDL source could generate tens of
different output files, varying wildly language by language.

-Randy

On Mon, Aug 31, 2015 at 5:25 AM, J <mv...@gmail.com> wrote:

> Hi, I'm wondering if there's a way to make the thrift compiler generate
> annotations (i.e. like
> https://developers.google.com/closure/compiler/docs/js-for-compiler) for
> the generated JS client code. Alternatively, is there some easy way to
> generate externs for the generated JS client code?
>

Re: Generating JS client with annotations

Posted by Jens Geyer <je...@hotmail.com>.
Hi J,

not sure about the state of the JS code, but at least I know we have such 
things implemented for other languages, namely Go. So even if it is not yet 
in there (and without looking into all the dirty details), it sounds not too 
complicated to add it to me.

To see what's possible right now enter "thrift --help" on the command line, 
this tells you all the options for all generators available.

Have fun,
The Real J


-----Ursprüngliche Nachricht----- 
From: J
Sent: Monday, August 31, 2015 2:25 PM
To: user@thrift.apache.org
Subject: Generating JS client with annotations

Hi, I'm wondering if there's a way to make the thrift compiler generate
annotations (i.e. like
https://developers.google.com/closure/compiler/docs/js-for-compiler) for
the generated JS client code. Alternatively, is there some easy way to
generate externs for the generated JS client code?