luau-lang / luau

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
https://luau-lang.org
MIT License
3.79k stars 349 forks source link

Add type checking to `Luau.Web.js` #1292

Open Stefanuk12 opened 3 weeks ago

Stefanuk12 commented 3 weeks ago

As far as I can tell, Luau.Web.js loads some WASM that lets you run Luau on the web, but it doesn't bundle one of Luau's biggest features: type checking. Adding another function into the module like checkScript that checks the types of the script would be awesome.

Use case

The main use case for this is to have a better online editor for things like the demo.

Technicalities

Some additional code will be needed to handle global type files and allowing the imports of types in general. A solution could be for checkScript could take the source, and then an array of source "type files".