Luau Typing, Trying to Add Variadic String to Function Type Argument

As title says, I’m trying to add a variadic to a type that contains a function.
Within’ the function I want an argument to carry ... string only.

I tried referencing documentation but it showed some very complicated things that I really don’t understand since I haven’t really gotten into this since about 3-4 days ago.

type RbxFuncs = {
	RbxObjCertAll: (Obj: Instance,  Args:string<...A>) -> { Instance }
}

This is the closest I’ve gotten without an error.
However when intellisense displays it shows Args: string like it’s a single value instead of a variadic value.

I want Args: string to be ...: string

Try ...string

You can’t include variadic arguments to a string type. I’m guessing you want Args to be a container of string arguments, so I would go with this approach instead:

type RbxFuncs = {
    RbxObjCertAll: (Obj: Instance, ...string) -> {Instance}
}

Edit:
To traverse through the arguments in the function, you can do this:

function func(obj: Instance, ...: string): {Instance}
    local args = {...}
end

Wow, I guess I did a variation of that but messed up slightly to make me move on.
Thank you.

1 Like