Open mjpcasey opened 11 months ago
What do you mean you need to generate IUser?
I would expect this to be generated:
interface IUser {
userId: string;
name: string;
headImg: string;
}
It would be handy to have a typescript object with the type acquired from the generator after converting gRPC PROTO models with the ToObject method.
This would make protoc-gen-ts generate more code, than it currently is. You can use typescript type inference for this.
Something like this would work;
type IUser = ReturnType<typeof User.prototype.toObject>
message User{ string userId = 1; string name = 2; string headImg = 3; }
I need to generate file interface IUser {}