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

Provide Options type for execution in TS #1014

Closed
dasco144 opened this issue Mar 8, 2024 · 1 comment · Fixed by #1027
Closed

Provide Options type for execution in TS #1014

dasco144 opened this issue Mar 8, 2024 · 1 comment · Fixed by #1027

Comments

@dasco144
Copy link
Contributor

dasco144 commented Mar 8, 2024

I've created a TypeScript node script, that will execute protoc with ts-proto

I feel like it would be a nice idea to provide the Options type (provided here) in the npm package so that we can ensure that the options passed can have an extra layer of type safety/checking.

@stephenh
Copy link
Owner

stephenh commented Mar 8, 2024

Hi @dasco144 ; ah, that makes sense. I think nearly all users end up invoking ts-proto via a protoc command line call, so historically I've not really worried about this.

But if this is as simple as export-ing the Options type, so you could do:

import { Options } from ts-proto;

That sounds good to me! If you could submit a PR for it, that'd be great, thanks!

stephenh pushed a commit that referenced this issue Apr 13, 2024
Closes #1014

Co-authored-by: Daniel Santiago <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants