Replies: 2 comments
-
Code-gen is correct, we allow dicts to be passed in lieu of structs. But doc-gen is wrong because structs are only turned into kwargs if they are at the last argument position. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks @RomainMuller. Opened a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to figure out if jsii behaves as expected in the following scenario.
Here is my TypeScript code:
Notice the method accepts two structs. And this is what jsii generates for python:
So the last struct argument is expanded into its keys, which is expected. But I am a bit surprised by the translation to a union type for the first struct argument. Is this intentional so that we can support the following invocation patterns?
If so, there's a bug with jsii-docgen, which currently generates the following signature for this case:
Beta Was this translation helpful? Give feedback.
All reactions