lune/tests/task/fcheck.luau

13 lines
234 B
Lua
Raw Normal View History

2023-01-24 17:52:41 +00:00
return function(index: number, type: string, value: any)
if typeof(value) ~= type then
error(
2023-01-24 17:52:41 +00:00
string.format(
"Expected argument #%d to be of type %s, got %s",
index,
type,
console.format(value)
)
)
end
end