I’m not on my computer to give proper scripts, but for example,
function module.new(Word:string,Age:number,AnotherWord:string?) : boolean
print(Word,Age)
return true
end
In this case, the function is typechecked. It tells IntelliSense that:
- Word is a string
- Age is a number
- AnotherWord can either be a string or nil (optional argument)
- The function returns a boolean