bytecodealliance / jco

JavaScript toolchain for working with WebAssembly Components
https://bytecodealliance.github.io/jco/
Apache License 2.0
640 stars 63 forks source link

fix: Wrap lists in Array to handle optional types #481

Closed blaine-arcjet closed 3 months ago

blaine-arcjet commented 3 months ago

Closes #480

This changes the types generated for a WIT list to use Array<> syntax, which allows for something like option<foo> to be expanded to foo | undefined without generating the wrong type signature. Using Array<> also avoids the need to wrapping too much stuff in parens.

phated commented 3 months ago

@guybedford I need this at work. Can we get this merged and released 🙏❤️

guybedford commented 3 months ago

Thanks for the fix, will post out a release soon.