-
Notifications
You must be signed in to change notification settings - Fork 33
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
Generating regular typescript interfaces representing services in ts-proto #115
Comments
I agree that it would be really nice to have. One concern is — if we decide to make a breaking change in Another concern is the So there are no blockers to your proposal, but there are some things to keep in mind. |
Opened a PR: stephenh/ts-proto#555 |
Starting from version To start using this feature, add |
This is a great quality of life improvement, much appreciated, and many thanks for taking the feedback onboard so quickly! |
I have raised this as an issue / feature request on ts-proto as the actual change would be needed there, but would be interested to get the feedback from this end on the proposal, see stephenh/ts-proto#545
In short, I do quite like the model of using a single definition for a service that can be used for service implementations as well as clients, though the Typescript magic required for this on the service side does mean that IDE tooling and error messages are not quite as helpful as they could be.
If ts-proto could generate an actual regular typescript interface that a service would implement, with regular method signatures, then IDE tooling such as "implement interface" would presumably give more readable signatures, and type errors may be somewhat more obvious than what they are now.
Is there anything in principle that would prevent this from working, or being a good idea?
The text was updated successfully, but these errors were encountered: