Open danias opened 1 year ago
@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 -I=$PROTO_DIR --ts_out=$TMP_DIR --ts_opt=target=web *.proto;
protoc-gen-ts generates files with class-constructors that look like this:
```
export class ComfyRequest extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
workflows?: Workflow[];
input_files?: WorkflowFile[];
save_outputs?: boolean;
hold_worker?: boolean;
room_id?: string;
}) {
```
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
grpc-web@1.4.2
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.