Hey ya’ll been a while since I posted. I have been writing some module scripts to help me with various mundane and repetitive tasks recently. While doing this I sometimes require a table of extra arguments like a “settings” table for example. What I have come to realize is that Luau doesn’t seem to have a way to typecheck for a table? I don’t mean like typeof()
I mean in the function parameters.
Example:
function fizz(buzz: string, bazz: number): boolean
However if I try typechecking for param: table
it doesn’t work and gives me an error.
“Unkown type ‘table’”??
However if I type table
it gets highligted and it comes up in autocomplete:
It does say it’s a library but wouldn’t that also make it a type? I know it’s probably not a primitive type like string
, boolean
, or number
but why can I typecheck those and not table
? Is there a way to typecheck it??
Please help!
(EDIT: Fixed a spelling error!)