Quick actions

cmd+k|ctrl+k

Navigation

Languages

TypeChecker

Snippet info

Language

Lua

Visibility

public

Author

mrhax0909

Created

2023-10-18T22:48:12.614267Z

Updated

2023-12-08T21:48:58.45124Z

require("Dependencies")

Cool = TypeProtect(
    {
        a = "number|string",
        b = "number|string",
        c = "boolean?"
    }, "any...", 0,
    function(Def, ...)
        if Def.c then
            return Def.a - Def.b, ...
        else
            return Def.a + Def.b, ...
        end
    end
)

print(Cool({
    a = 1,
    b = 3,
    c = true
}))

print(Col3(1, 0, 1):ToHSV())

--[[
print(Cool({
    a = 1,
    b = 2,
    c = false
}, "hi", true, 5))

print(Cool({
    a = 1,
    b = false,
    c = false
}, "hello"))
]]

print(unpack({"hi", "hello", 3}, 1, -1))
INFO