RxJS wrapper for gRPC and TypeScript (Node.js and browser). Current stable version 3.0.1. Wraps @grpc/grpc-js and grpc-web with RxJS Observables and Promises, enabling reactive server implementations and client calls. Requires rxjs^6 and either @grpc/grpc-js or grpc-web. Ships TypeScript types. Alternative to manually handling gRPC callbacks and event streams. Release cadence is irregular.
npm install reactive-grpcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a reactive gRPC server using defineService with RxJS operators. Imports from '/node' and uses generated protobuf types.
Update imports: import from 'reactive-grpc/node' or 'reactive-grpc/web' instead of plain 'reactive-grpc'.
Ensure rxjs v6 is installed: npm install rxjs@6
Install the appropriate peer dependency: npm install @grpc/grpc-js for Node.js or grpc-web for browser.
Replace toPromise() with lastValueFrom() or firstValueFrom() from rxjs.
Always pass the generated server interface (IExampleServer) as a generic parameter to defineService.
Change import to 'reactive-grpc/node' for Node.js or 'reactive-grpc/web' for browser.
Ensure methods that should be streaming return Observable<T>, and unary methods return Promise<T> or T.
Downgrade to rxjs v6 or wrap Observable with from() before returning.
Check that all methods from the server interface are implemented with correct names.