thrift-typescript
thrift-typescript copied to clipboard
Allow * for language choice in namespace declarations
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?
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.
Stiil doesn`t support it?