SpacetimeDB
SpacetimeDB copied to clipboard
TypeScript SDK codegen: complex types lack proper parentheses
The Rust type Vec<Vec<Option<u32>> gets codegenned as number | undefined[][]. It should instead be (number | undefined)[][]. Likely the simplest fix to this is to unconditionally print parens around the element-type of array types, so that we print ((number | undefined)[])[]. I am unsure if TypeScript has other type operators that can cause problems in this way.
Ah, this must be my bad. Apologies!