SpacetimeDB
SpacetimeDB copied to clipboard
Typescript Generation: Wrap union types in parens if for arrays
Description of Changes
When generating typescript types, if we have an array of unions, we wrap the inner type in parens, to fix https://github.com/clockworklabs/SpacetimeDB/issues/2541.
API and ABI breaking changes
This should only change the generated code in places that would have been a bug.
Expected complexity level and risk
Testing
I didn't see a good place to add full tests for the typescript generation. We will want to do that at some point.
For this change I created a module with some more complex array types and inspected the generated code.