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

import public not supported in TypeScript code generator #1339

Open
augi opened this issue May 17, 2023 · 3 comments
Open

import public not supported in TypeScript code generator #1339

augi opened this issue May 17, 2023 · 3 comments

Comments

@augi
Copy link
Contributor

augi commented May 17, 2023

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.

@sampajano
Copy link
Collaborator

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 😃

@augi
Copy link
Contributor Author

augi commented May 26, 2023

Hello, we could change the protos so we solved this by using just plain _import_s. So it is not a blocker for us.

@sampajano
Copy link
Collaborator

Aha ok good to know about the alternative!

Agreed that this would be a good to have still 😃

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

2 participants