-
Notifications
You must be signed in to change notification settings - Fork 683
Closed
Description
Hey,
After updating to @grpc/grpc-js all the exports got changed from export BookService
| out->Print(template_vars, "var $name$Service = exports.$name$Service = {\n"); |
export['com.book.BookService'].| out->Print(template_vars, "var $name$Service = exports['$full_name$'] = {\n"); |
What is the point of such change? Now it's not possible to generate proper typescript definitions for such exports.
// grpc
import { BookServiceClient } from "./proto/book_grpc_pb";
const client = new BookServiceClient("127.0.0.1:50051", grpc.credentials.createInsecure());
// changed to
// grpc-js
import * as bookGrpcPb from "./proto/book_grpc_pb";
// @ts-ignore
const BookServiceClient = grpc.makeClientConstructor(bookGrpcPb["com.book.BookService"], "BookService");So now such export is not valid for Typescript and you have to write // @ts-ignore.
Why was removed export of the BookServiceClient? or at least BookService?
dddenis
Metadata
Metadata
Assignees
Labels
No labels