Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow * for language choice in namespace declarations #119

Open
r4j4h opened this issue Jun 8, 2018 · 2 comments
Open

Allow * for language choice in namespace declarations #119

r4j4h opened this issue Jun 8, 2018 · 2 comments

Comments

@r4j4h
Copy link

r4j4h commented Jun 8, 2018

namespace * MyNamespace

is recommended in https://www.manning.com/books/programmers-guide-to-apache-thrift-cx (please ignore the cancelled message) and compiles fine using the namespace in all languages (that I've tried) using the Apache Thrift code generator.

With thrift-typescript I encounter:

    Parse Failure: 2 errors found:


    Scan Error:

    Message: Unexpected token: *

    4 | namespace * MyNamespace
                  ^


    Parse Error:

    Message: Unable to find name identifier for namespace

    4 | namespace * MyNamespace

I can bypass it by replacing * with js but then I am going to have to duplicate the namespace line for each language I want to support.

Is this an approach that thrift-typescript could support or is my current approach actually a bad idea in practice?

@kevin-greene-ck
Copy link
Contributor

I think supporting the * character makes a lot of sense. We've obviously just included namespaces for all of our supported languages to this point. Don't think this would be a big change, but not sure either when we would have the time to get to it. Will add it to our list of features to support.

@STih07
Copy link

STih07 commented Dec 13, 2018

Stiil doesn`t support it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants