grpc-web-utils provides Node.js utilities for gRPC-Web including deadline and cancellation support. Current version 0.1.0 (stable, infrequent releases). Key differentiators: offers a SignalStreamInterceptor for AbortController-based cancellation and helper types like MetadataWithSignal. Supports TypeScript types. Primarily for streaming cancellation; note that createPromiseClient may not support cancellation.
npm install grpc-web-utilsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates deadline setting and AbortController-based cancellation for gRPC-Web streaming.
Use direct RPC client with SignalStreamInterceptor instead of createPromiseClient.
Import MetadataWithSignal and use 'as MetadataWithSignal' on metadata object.
Use deadline metadata for unary calls instead.
Use 'md["deadline"] = deadline.getTime().toString()' instead of number.
Ensure you have installed grpc-web-utils and imported SignalStreamInterceptor. Use 'as any' or extend types if needed.
Ensure AbortController is instantiated and signal is passed in metadata options.
Use type assertion: 'client.serverStreamingEcho(req, { signal: controller.signal } as any)' or define custom type.No dependency data recorded yet.