ts-proto icon indicating copy to clipboard operation
ts-proto copied to clipboard

Provide Options type for execution in TS

Open dasco144 opened this issue 1 year ago • 1 comments

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.

dasco144 avatar Mar 08 '24 14:03 dasco144

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 avatar Mar 08 '24 15:03 stephenh