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

Feature request: First class support for nice-grpc #545

Closed
SoftMemes opened this issue Apr 5, 2022 · 2 comments · Fixed by #555
Closed

Feature request: First class support for nice-grpc #545

SoftMemes opened this issue Apr 5, 2022 · 2 comments · Fixed by #555
Labels

Comments

@SoftMemes
Copy link

Ts-proto currently has the "generic" service output target that creates a data representation of a service that can be used both at runtime, and to infer Typescript type signatures of services and clients.

With the magic of Typescript, this works with respect to type checking. An implementation of a service in nice-grpc that implements ServiceImplementation<typeof SomeServiceDefinition> will be appropriately typed and any mismatch in signature will be flagged.

It is not however that IDE friently. Specifically due to the inferred type signatures, there's no clean way to simply use "implement interface" or similar refactoring tools in IntelliJ or other IDEs. It is possible, but the signature it generates is far from readable.

To support nice-grpc, it would be extremely helpful if a regular Typescript interface could be generated, matching the signature of ServiceImplementation and extending from it, so that an implementing class could simply provide the methods of this regular interface and typing errors would be much more readable.

aikoven pushed a commit to aikoven/ts-proto that referenced this issue Apr 24, 2022
stephenh pushed a commit that referenced this issue May 1, 2022
…555)

Closes #545

Co-authored-by: aikoven <dan.lytkin@gmail.com>
stephenh pushed a commit that referenced this issue May 2, 2022
# [1.112.0](v1.111.0...v1.112.0) (2022-05-02)

### Bug Fixes

* update codegen for `nice-grpc` ([#561](#561)) ([d503f67](d503f67))

### Features

* add support for generating `nice-grpc` server and client stubs ([#555](#555)) ([8c19361](8c19361)), closes [#545](#545)
@stephenh
Copy link
Owner

stephenh commented May 2, 2022

🎉 This issue has been resolved in version 1.112.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@SoftMemes
Copy link
Author

I've been able to move over to using the generates interfaces in our project and IntelliJ does indeed like them a lot more, many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants