Here I have a type alias with a function as the type of value.

type typeAlias = {value: function}

However when I run this code in studio, it says this:

type typeAlias = {value: function}:1: Expected type, got 'function'

How can I fix it?

1 comment

0

Type() is used to tell you the type of a variable, string, nil, number, bool etc. Read here: https://developer.roblox.com/en-us/api-reference/lua-docs/Lua-Globals