Closed incrediblesound closed 5 years ago
Hmm, not quite following. Yes, they would both export a Processor
class, but they should be namespaced even in the same file. For example, here is the unit test for the case of service extends service: https://github.com/creditkarma/thrift-typescript/blob/master/src/tests/unit/index.spec.ts#L298. In this case there should be two namespaces generated ParentService
and ChildService
and each would export a Processor
. Can you give a more complete thrift example I can test?
Closing as this is old. Reopen if you have more details.
Hello, I've been trying to get this package to work and there's one problem I can't seem to get around.
I have a service with some generic methods defined on it, and another service, let's call it
my_app.thrift
which inherits from this base class.The generate function puts all output into the same file, and it appears that both the abstract service and the "my_app" service are rendered in that file with the same name (
export class Processor
) resulting in the error message:Class 'Processor' used before its declaration.
If you have any insight into this problem I'd really appreciate it, and I can provide additional details if needed.