mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 04:50:36 +00:00
14 lines
270 B
Text
14 lines
270 B
Text
local stdio = require("@lune/stdio")
|
|
|
|
return function(index: number, type: string, value: any)
|
|
if typeof(value) ~= type then
|
|
error(
|
|
string.format(
|
|
"Expected argument #%d to be of type %s, got %s",
|
|
index,
|
|
type,
|
|
stdio.format(value)
|
|
)
|
|
)
|
|
end
|
|
end
|