-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
MethodDescriptor type issue in TypeScript #1351
Comments
@danias Hi! Thanks for the report (and providing the example patch how the issue can be fixed)! The patch you provide relaxes the type check so i understand it would fix the issue but also more potential bugs can slip in. I wonder if you could provide more details on what exactly does your generated typescript files look like? I assume that this issue is due to the specific proto you are using. You could confirmed that if you try out our TS example and see if the issue also reproduces there for you. Thanks! |
I ran into this same issue, I'm compiling protoc files with: https://www.npmjs.com/package/protoc-gen-ts Using the command
|
protoc-gen-ts generates files with class-constructors that look like this:
however MethodDescriptor in this library expects them to be of type ...args: unknown[], causing a spurious type conflict. You should really find a way to make the method-descriptor type more broadly compatible. |
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
Today I used patch-package to patch
[email protected]
for the project I'm working on.The autogenerated files are not compatible with the current MethodDescriptor definition that has ...args: unknown[]. As a result my TypeScript project fails to run.
The command I am running to generate the files is the following:
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: