You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disabling outputPartialMethods causes fewer issues, but there are several issues that remain with google/protobuf/struct.ts. First, the struct 'fromJSON' method uses 'fromPartial', which is not being generated.
const struct = Struct.fromPartial({});
Second, the wrap method uses syntax that is incompatible with the oneof=unions syntax.
Side note: Enabled outputPartialMethods without enabling outputJson seems to be a no-op.
The text was updated successfully, but these errors were encountered:
stevevarga
changed the title
Enabling "outputJsonMethods" causes
Enabling "outputJsonMethods" and "outputPartialMethods" causes builds to fail.
Dec 29, 2021
Hm, well the the struct.ts / oneof=unions I think is a known issue in #458...
Property 'enabled' does not exist on type 'I'
Can you give more context of the code that causes that error?
You can try the newly added useExactTypes=false option to see if it fixes the generic errors, but if it does I'd love to have a as-minimal-as-possible reproduction *.proto that shows what the issue is, to see if we can try and fix it, instead of just disabling it.
Can now no longer reproduce the generic issue, it may have been a side effect of #458 or TS config settings. Will open a new issue if it comes up again with a concrete example.
Using TS-Proto v1.96.1 with the following config
fails to compile, with a large number of issues.
Disabling
outputPartialMethods
causes fewer issues, but there are several issues that remain with google/protobuf/struct.ts. First, the struct 'fromJSON' method uses 'fromPartial', which is not being generated.Second, the
wrap
method uses syntax that is incompatible with theoneof=unions
syntax.Once
outputPartialMethods
is enabled, a large number of errors (~593 in my case) appear. They seem to be mostly related to Generics...Property 'enabled' does not exist on type 'I'
Type 'I' does not satisfy the constraint
Type 'Record' is not generic.
etc.
Here is my TSConfig, for Typescript version 4.5.4
Side note: Enabled
outputPartialMethods
without enablingoutputJson
seems to be a no-op.The text was updated successfully, but these errors were encountered: