You could just make a module script and require it to export all they type from there. If you don’t want hundred of clutter type-check on your function parameter. An example follow by nicemike40 post: Exported types in Luau - #4 by nicemike40
Module script
export type name = "Fireworks" | "ButtonPush"
return nil
Your Module script
local types = require(path.to.ModuleScript)
local WorldFx = {}
local WorldFx:TriggerClient(name: types.name, ...)
--things to do
end
return WorldFx
You’re compounding two separate features. The typechecking is what you’re writing on the parameters and also what you’re seeing above the description of the function. The scroll list is part of auto complete; you can’t configure argument auto complete for your own functions.
I guess doing this just won’t be worth it… I wonder if Lua or Luau itself might come out with some special table-unpacking to use for types, though that seems unlikely.
Lerps example is probably the best-case scenario for doing this, if anybody sees this topic in the future. Otherwise, I’m just going to trust my own spelling abilities lol