We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
message User{ string userId = 1; string name = 2; string headImg = 3; } I need to generate file interface IUser {}
message User{ string userId = 1; string name = 2; string headImg = 3; }
The text was updated successfully, but these errors were encountered:
What do you mean you need to generate IUser?
Sorry, something went wrong.
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>
No branches or pull requests
message User{ string userId = 1; string name = 2; string headImg = 3; }
I need to generate file interface IUser {}
The text was updated successfully, but these errors were encountered: