Roblox api missing from generated files
Closed this issue · 2 comments
The generated files from --generate-luau-types
, --generate-selene-types
and --generate-docs-file
don't include types nor documentation for roblox apis.
The next release will have much better type definitions for instances and the roblox
builtin, you can see the current progress here: https://github.com/filiptibell/lune/blob/65ea0edc12a3e27aec75c9d6f4449e826440f7d8/docs/typedefs/Roblox.luau
Thinking about this some more, realistically I don't think we will ever ship full / complete type definitions for instances. The best option if you need that is probably to use the roblox types setting in luau-lsp
, and cast Lune's barebones instances using something like:
local roblox = require("@lune/roblox")
local instances = (roblox.deserializeModel(...) :: any) :: { Instance }
-- the table of instances now has accurate types
This may lead to the above instances showing property definitions that Lune does not yet know about, but I think that's better than the alternative of Lune including a type definitions file that is ~0.5mb or more in size, like what luau-lsp
has.