Skip to main content

TypeChecker

tip

This should be constructed for each connection or each connection with the same types.

Constructs a middleware function with the settings you select.

local newChecker = TypeChecker({"string", "number"})
--Or use it like this:
NeoNet:Connect("SomeEvent", function()
    --do something
end, TypeChecker{"string", "number"})

if you want to create your own middleware check out the docs page on it.

Show raw api
{
    "functions": [],
    "properties": [],
    "types": [],
    "name": "TypeChecker",
    "desc": ":::tip\nThis should be constructed for each connection\nor each connection with the same types.\n:::\n\nConstructs a middleware function with the settings you select.\n```lua\nlocal newChecker = TypeChecker({\"string\", \"number\"})\n--Or use it like this:\nNeoNet:Connect(\"SomeEvent\", function()\n    --do something\nend, TypeChecker{\"string\", \"number\"})\n```\n\nif you want to create your own middleware check out the docs page on it.",
    "source": {
        "line": 21,
        "path": "src/NeoNet/TypeChecker.lua"
    }
}