diff --git a/integration/grpc-js/simple.ts b/integration/grpc-js/simple.ts index c1b084901..cecb91249 100644 --- a/integration/grpc-js/simple.ts +++ b/integration/grpc-js/simple.ts @@ -3,22 +3,17 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; -import { - ChannelCredentials, - Client, +import { ChannelCredentials, Client, makeGenericClientConstructor, Metadata } from "@grpc/grpc-js"; +import type { + CallOptions, ClientDuplexStream, + ClientOptions, ClientReadableStream, + ClientUnaryCall, ClientWritableStream, handleBidiStreamingCall, handleClientStreamingCall, handleServerStreamingCall, - makeGenericClientConstructor, - Metadata, -} from "@grpc/grpc-js"; -import type { - CallOptions, - ClientOptions, - ClientUnaryCall, handleUnaryCall, ServiceError, UntypedServiceImplementation, diff --git a/integration/nestjs-metadata-grpc-js/hero.ts b/integration/nestjs-metadata-grpc-js/hero.ts index c0f79bfeb..ba008e03f 100644 --- a/integration/nestjs-metadata-grpc-js/hero.ts +++ b/integration/nestjs-metadata-grpc-js/hero.ts @@ -3,8 +3,8 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; -import { handleBidiStreamingCall, Metadata } from "@grpc/grpc-js"; -import type { handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; +import { Metadata } from "@grpc/grpc-js"; +import type { handleBidiStreamingCall, handleUnaryCall, UntypedServiceImplementation } from "@grpc/grpc-js"; import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices"; import { Observable } from "rxjs"; diff --git a/src/generate-grpc-js.ts b/src/generate-grpc-js.ts index 40a50e8eb..8fcbde771 100644 --- a/src/generate-grpc-js.ts +++ b/src/generate-grpc-js.ts @@ -10,13 +10,13 @@ const CallOptions = imp("t:CallOptions@@grpc/grpc-js"); const ChannelCredentials = imp("ChannelCredentials@@grpc/grpc-js"); const ClientOptions = imp("t:ClientOptions@@grpc/grpc-js"); const Client = imp("Client@@grpc/grpc-js"); -const ClientDuplexStream = imp("ClientDuplexStream@@grpc/grpc-js"); -const ClientReadableStream = imp("ClientReadableStream@@grpc/grpc-js"); +const ClientDuplexStream = imp("t:ClientDuplexStream@@grpc/grpc-js"); +const ClientReadableStream = imp("t:ClientReadableStream@@grpc/grpc-js"); const ClientUnaryCall = imp("t:ClientUnaryCall@@grpc/grpc-js"); -const ClientWritableStream = imp("ClientWritableStream@@grpc/grpc-js"); -const handleBidiStreamingCall = imp("handleBidiStreamingCall@@grpc/grpc-js"); -const handleClientStreamingCall = imp("handleClientStreamingCall@@grpc/grpc-js"); -const handleServerStreamingCall = imp("handleServerStreamingCall@@grpc/grpc-js"); +const ClientWritableStream = imp("t:ClientWritableStream@@grpc/grpc-js"); +const handleBidiStreamingCall = imp("t:handleBidiStreamingCall@@grpc/grpc-js"); +const handleClientStreamingCall = imp("t:handleClientStreamingCall@@grpc/grpc-js"); +const handleServerStreamingCall = imp("t:handleServerStreamingCall@@grpc/grpc-js"); const handleUnaryCall = imp("t:handleUnaryCall@@grpc/grpc-js"); const UntypedServiceImplementation = imp("t:UntypedServiceImplementation@@grpc/grpc-js"); const makeGenericClientConstructor = imp("makeGenericClientConstructor@@grpc/grpc-js");