I’ve been trying to figure out how I’d make the parameter data type for typechecking a function. Example:
--!strict
local function ExecuteAfter5Seconds(FunctionToExecute : function)
task.wait(5)
FunctionToExecute()
end
local function Hello()
print("Hello world!")
end
ExecuteAfter5Seconds(Hello)
But this just results in it erroring with “Expected type, got ‘function’” in
local function ExecuteAfter5Seconds(FunctionToExecute : function)
Is there any way I can achieve this without it erroring?