grpc-web
grpc-web copied to clipboard
import public not supported in TypeScript code generator
It looks like import public feature of Protofile is not supported correctly when generating TypeScript code.
The generated code contains plain import * as in the file that corresponds to the Protofile with import public, and so the file where the transitive type is used is invalid, because of missing import. As TypeScript doesn't support a feature like import public (IMHO), the code generator should generate the transitive imports manually.
Thanks for the report @augi! This sounds reasonable to me :)
Is this an important use case for you? If you'd like to contribute a solution here, would be happy to provide code reviews 😃
Hello, we could change the protos so we solved this by using just plain _import_s. So it is not a blocker for us.
Aha ok good to know about the alternative!
Agreed that this would be a good to have still 😃