Implementation of gRPC health checking protocol in TypeScript, version 3.1.3. Provides client and server health check services compatible with @grpc/grpc-js. Requires @grpc/grpc-js >=1.8.14 and @grpc/proto-loader >=0.7.7 as peer dependencies. Generates TypeScript types from .proto files. Key differentiator: full TypeScript support with type safety for health check requests and responses, enabling easy integration into gRPC microservices.
npm install grpc-ts-health-checkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a gRPC health check client, loads proto definition, and makes a check request.
Update @grpc/grpc-js to >=1.8.14 and @grpc/proto-loader to >=0.7.7.
Pass grpc.ChannelCredentials.createSsl() or other secure credentials instead of createInsecure().
Generate TypeScript types from health.proto using protoc and the ts-proto plugin, then import generated types.
Use grpc.ClientReadableStream<HealthCheckResponse> from @grpc/grpc-js.
Manually create ServiceError objects instead of using grpc-boom.
Upgrade @grpc/grpc-js to >=1.8.14 and @grpc/proto-loader to >=0.7.7.
Run 'npm install grpc-ts-health-check' and ensure import path is correct.
Generate types from health.proto using ts-proto and import them, or cast to any.