How do you declare a type method that accepts an unlimited amount of parameters (...)?

I think it’s called a variadic function. Is it possible to do? Like below (has no error, but it doesn’t produce the result I want.)

image
Intellisense suggest does not show that I can input a tuple.
image

May be wrong but you can do:

(...): any

Like this? Syntax error since brackets define a method :-{

And if you just leave … Instead of it?
Like (apologizes if doesn’t produce the desired result, I don’t use type checking often so not proficient with them, also on mobile)

(self: CharacterState, ...)
1 Like

Im pretty sure its just …type

(self: CharacterState, ...any) -> nil
1 Like

Figured it out just as you were writing the reply! Ty both yall

image
image

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.