LuaU how to typecheck as function

function example(parameter: () -> nil)
    parameter()
end

or

example: (parameter: () -> nil) -> nil = function(parameter)

end

and you have types for the function arguments.

10 Likes