latte-soft / wax

A Lua 5.1x+/Luau Project Bundler Runtime, Using Roblox Models and Module-Require Semantics
https://latte.to
MIT License
27 stars 1 forks source link

Wax cannot handle exported types #5

Open metatablecat opened 5 months ago

metatablecat commented 5 months ago

A common pattern in libraries is to have a dedicated Types library, however, it looks like Wax doesn't handle types that use the A.B syntax that well. (which is to be expected, luau is silly).

If the library does use a Types module (which can usually be detected by the module not returning anything nil), it should probably unwrap the types and remove the export keyword if neccessary.

Best compromise I can think of is to wrap an exported type as ModuleName_Type in the bundle.