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

Offer typings as part of the grpc-health-check package #1506

Closed
acazacu opened this issue Jul 17, 2020 · 3 comments
Closed

Offer typings as part of the grpc-health-check package #1506

acazacu opened this issue Jul 17, 2020 · 3 comments

Comments

@acazacu
Copy link

acazacu commented Jul 17, 2020

Is your feature request related to a problem? Please describe.

Using the grpc-health-check with Typescript, the package does not currently offer typings, making it cumbersome to work with.

Describe the solution you'd like

Include typings into the package via the tools made available to generate them. As part of the publishing process, my suggestion would be to use ProtobufJS to generate the typings and include them into the published package.

Describe alternatives you've considered

An alternative solution and a current workaround that I implement is compiling the typings in the implementing project. This, however, is not efficient. It requires bundling the Health protocol definition in every implementing project.

Additional context

N/A

@murgatroid99
Copy link
Member

Currently the Protobuf code for that library is generated using grpc-tools, so the types for that would need to be generated with grpc_tools_node_protoc_ts to get the corresponding types. Pull requests are welcome.

Alternatively, for a while I have considered creating a version 2.0 of the library that exports a PackageDefinition object that can be loaded into either gRPC implementation. Generating usable TypeScript types for that might be tricky.

@murgatroid99
Copy link
Member

I just created a proposal for a new API for this library that would include this change, at grpc/proposal#391. Please comment there if you have any feedback on that design.

@murgatroid99
Copy link
Member

grpc-health-check version 2.0.0 includes full TypeScript types for its APIs.

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