Skip to main content

t

t is a runtime type checker for Roblox Luau. It is a fork of osyrisrblx/t published as kashtheking/t, with the same API plus checks for newer Roblox types (buffer, Content, Font, FloatCurveKey, ...).

Checks

Everything in t is built from checks. A check is a function with the signature (value: any) -> (boolean, string?): it returns true when the value is acceptable, or false followed by a human-readable message explaining what was wrong. Members of t come in two flavours:

  • Plain checks that you call directly: t.string, t.number, t.boolean, t.table, t.Instance, t.Vector3, t.CFrame, t.any, t.integer, t.nan, t.numberPositive, ...
  • Check constructors that take arguments and return a new check, so you compose them: t.optional(t.string), t.array(t.number), t.numberMin(0), t.literal("a", "b"), t.interface({ ... }), t.tuple(...), t.instanceIsA("BasePart").

Because a failing check returns false, message, assert(check(value)) raises that message as the error, which is the idiomatic way to guard arguments.

local t = require(path.to.t)

local ok, err = t.number(5)   --> true
ok, err = t.number("5")       --> false, "number expected, got string"

-- Build checks once, at module level, and reuse them.
local IsSaveData = t.interface({
	Level = t.numberMin(1),
	Coins = t.integer,
	Inventory = t.array(t.string),
	Nickname = t.optional(t.string),
	Team = t.literal("Red", "Blue"),
})

local checkSave = t.tuple(t.instanceIsA("Player"), IsSaveData)

local function savePlayer(player, data)
	assert(checkSave(player, data))
	-- ...
end

-- Or let t generate the guard for you:
local savePlayerStrict = t.wrap(savePlayer, checkSave)
local assertSave = t.strict(checkSave) -- assertSave(player, data) errors on bad input

Type checks

The plain type checks are created with t.typeof (or t.type for userdata and vector) and simply compare the value's type name. Lua primitives: t.boolean, t.buffer, t.thread, t.callback (alias t["function"]), t.none (alias t["nil"]), t.string, t.table, t.userdata, t.vector, plus t.number (which rejects NaN) and t.nan. Roblox data types: t.Axes, t.BrickColor, t.CatalogSearchParams, t.CFrame, t.Content, t.Color3, t.ColorSequence, t.ColorSequenceKeypoint, t.DateTime, t.DockWidgetPluginGuiInfo, t.Enum, t.EnumItem, t.Enums, t.Faces, t.FloatCurveKey, t.Font, t.Instance, t.NumberRange, t.NumberSequence, t.NumberSequenceKeypoint, t.OverlapParams, t.PathWaypoint, t.PhysicalProperties, t.Random, t.Ray, t.RaycastParams, t.RaycastResult, t.RBXScriptConnection, t.RBXScriptSignal, t.Rect, t.Region3, t.Region3int16, t.TweenInfo, t.UDim, t.UDim2, t.Vector2, t.Vector2int16, t.Vector3, t.Vector3int16. Each is also listed individually below.

Aliases

t.some = t.union, t.every = t.intersection, t.instance = t.instanceOf, t["function"] = t.callback, t["nil"] = t.none, and the deprecated t.exactly = t.literal.

Credits: t was created by Osyris (osyrisrblx/t, MIT). This build is his library published to Wally as kashtheking/t with checks for newer Roblox data types added by KashTheKing.

Installation and guide: t package page.

Types​

Check​

type Check = (value: any) → (
boolean,
string?
)

A type check. Returns true if value is acceptable, otherwise false and a message that describes the problem. Every plain check in t has this signature and every check constructor returns one, so checks can be nested freely (t.array(t.optional(t.number))).

Functions​

type​

t.type(
typeName: string--

The name type() must return, e.g. "userdata", "vector", "string".

) → Check--

Fails with "<typeName> expected, got <actual>".

Returns a check that passes when Lua's type(value) equals typeName. Prefer t.typeof for anything but the raw Lua categories, because type reports every Roblox data type as "userdata" (and Vector3 as "vector").

local isUserdata = t.type("userdata")
print(isUserdata(CFrame.new())) --> true

typeof​

t.typeof(
typeName: string--

The name typeof() must return, e.g. "Vector3", "Instance", "EnumItem".

) → Check--

Fails with "<typeName> expected, got <actual>".

Returns a check that passes when Roblox's typeof(value) equals typeName. This is how all the built-in type checks (t.string, t.Vector3, t.Instance, ...) are made, so you only need it for a type that has no ready-made check.

local isSharedTable = t.typeof("SharedTable")

any​

t.any(
value: any--

The value to check.

) → (
boolean,--

true unless value is nil.

string?--

"any expected, got nil" on failure.

)

Passes for every value except nil. Use it for interface fields that must be present but may hold anything.

boolean​

t.boolean(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when typeof(value) == "boolean".

buffer​

t.buffer(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when the value is a Luau buffer.

thread​

t.thread(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when the value is a coroutine (thread).

callback​

t.callback(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when the value is a function. Also available as t["function"]. Every check constructor in t uses this internally to assert that the checks it receives are functions.

none​

t.none(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes only for nil. Also available as t["nil"]. Useful inside t.union or t.tuple when a position must be empty.

string​

t.string(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when the value is a string.

table​

t.table(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when the value is a table (any table, including arrays and objects with metatables). Use t.array, t.map, t.set or t.interface to check the contents as well.

userdata​

t.userdata(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when Lua's type(value) is "userdata", which is true for almost every Roblox data type (CFrame, Instance, Color3, ...) but not for Vector3, which is a native vector.

vector​

t.vector(
value: any--

The value to check.

) → (
boolean,--

Whether the value has the expected type.

string?--

"<type> expected, got <actual>" on failure.

)

Passes when Lua's type(value) is "vector", i.e. the value is a Vector3 (Luau stores Vector3 as a native vector). Equivalent in practice to t.Vector3.

number​

t.number(
value: any--

The value to check.

) → (
boolean,--

true for any non-NaN number.

string?--

"number expected, got <type>" or "unexpected NaN value" on failure.

)

Passes when the value is a number and is not NaN. Every numeric check in t (t.integer, t.numberMin, t.numberConstrained, ...) is built on this, so NaN never slips through them either. Use t.nan if you specifically want to accept NaN.

print(t.number(1.5))  --> true
print(t.number(0/0))  --> false, "unexpected NaN value"
print(t.number("1"))  --> false, "number expected, got string"

nan​

t.nan(
value: any--

The value to check.

) → (
boolean,--

true only for NaN.

string?--

The failure message.

)

Passes only when the value is a number that is NaN (value ~= value). Non-numbers fail with a type message; ordinary numbers fail with "unexpected non-NaN value".

Axes​

t.Axes(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Axes.

string?--

"Axes expected, got <actual>" on failure.

)

Passes when typeof(value) == "Axes".

BrickColor​

t.BrickColor(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a BrickColor.

string?--

"BrickColor expected, got <actual>" on failure.

)

Passes when typeof(value) == "BrickColor".

CatalogSearchParams​

t.CatalogSearchParams(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a CatalogSearchParams.

string?--

"CatalogSearchParams expected, got <actual>" on failure.

)

Passes when typeof(value) == "CatalogSearchParams".

CFrame​

t.CFrame(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a CFrame.

string?--

"CFrame expected, got <actual>" on failure.

)

Passes when typeof(value) == "CFrame".

Content​

t.Content(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Content.

string?--

"Content expected, got <actual>" on failure.

)

Passes when typeof(value) == "Content" (the Content data type used by asset properties).

Color3​

t.Color3(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Color3.

string?--

"Color3 expected, got <actual>" on failure.

)

Passes when typeof(value) == "Color3".

ColorSequence​

t.ColorSequence(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a ColorSequence.

string?--

"ColorSequence expected, got <actual>" on failure.

)

Passes when typeof(value) == "ColorSequence".

ColorSequenceKeypoint​

t.ColorSequenceKeypoint(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a ColorSequenceKeypoint.

string?--

"ColorSequenceKeypoint expected, got <actual>" on failure.

)

Passes when typeof(value) == "ColorSequenceKeypoint".

DateTime​

t.DateTime(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a DateTime.

string?--

"DateTime expected, got <actual>" on failure.

)

Passes when typeof(value) == "DateTime".

DockWidgetPluginGuiInfo​

t.DockWidgetPluginGuiInfo(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a DockWidgetPluginGuiInfo.

string?--

"DockWidgetPluginGuiInfo expected, got <actual>" on failure.

)

Passes when typeof(value) == "DockWidgetPluginGuiInfo".

Enum​

t.Enum(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Enum.

string?--

"Enum expected, got <actual>" on failure.

)

Passes when typeof(value) == "Enum" (the enum type, e.g. Enum.Material, not one of its items; see t.EnumItem and t.enum).

EnumItem​

t.EnumItem(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a EnumItem.

string?--

"EnumItem expected, got <actual>" on failure.

)

Passes when typeof(value) == "EnumItem" (an item such as Enum.Material.Plastic; use t.enum to also require a specific enum).

Enums​

t.Enums(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Enums.

string?--

"Enums expected, got <actual>" on failure.

)

Passes when typeof(value) == "Enums" (the global Enum table itself).

Faces​

t.Faces(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Faces.

string?--

"Faces expected, got <actual>" on failure.

)

Passes when typeof(value) == "Faces".

FloatCurveKey​

t.FloatCurveKey(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a FloatCurveKey.

string?--

"FloatCurveKey expected, got <actual>" on failure.

)

Passes when typeof(value) == "FloatCurveKey".

Font​

t.Font(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Font.

string?--

"Font expected, got <actual>" on failure.

)

Passes when typeof(value) == "Font".

Instance​

t.Instance(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Instance.

string?--

"Instance expected, got <actual>" on failure.

)

Passes when typeof(value) == "Instance" (any Instance; use t.instanceOf, t.instanceIsA or t.children to be more specific).

NumberRange​

t.NumberRange(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a NumberRange.

string?--

"NumberRange expected, got <actual>" on failure.

)

Passes when typeof(value) == "NumberRange".

NumberSequence​

t.NumberSequence(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a NumberSequence.

string?--

"NumberSequence expected, got <actual>" on failure.

)

Passes when typeof(value) == "NumberSequence".

NumberSequenceKeypoint​

t.NumberSequenceKeypoint(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a NumberSequenceKeypoint.

string?--

"NumberSequenceKeypoint expected, got <actual>" on failure.

)

Passes when typeof(value) == "NumberSequenceKeypoint".

OverlapParams​

t.OverlapParams(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a OverlapParams.

string?--

"OverlapParams expected, got <actual>" on failure.

)

Passes when typeof(value) == "OverlapParams".

PathWaypoint​

t.PathWaypoint(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a PathWaypoint.

string?--

"PathWaypoint expected, got <actual>" on failure.

)

Passes when typeof(value) == "PathWaypoint".

PhysicalProperties​

t.PhysicalProperties(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a PhysicalProperties.

string?--

"PhysicalProperties expected, got <actual>" on failure.

)

Passes when typeof(value) == "PhysicalProperties".

Random​

t.Random(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Random.

string?--

"Random expected, got <actual>" on failure.

)

Passes when typeof(value) == "Random" (a Random object from Random.new).

Ray​

t.Ray(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Ray.

string?--

"Ray expected, got <actual>" on failure.

)

Passes when typeof(value) == "Ray".

RaycastParams​

t.RaycastParams(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a RaycastParams.

string?--

"RaycastParams expected, got <actual>" on failure.

)

Passes when typeof(value) == "RaycastParams".

RaycastResult​

t.RaycastResult(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a RaycastResult.

string?--

"RaycastResult expected, got <actual>" on failure.

)

Passes when typeof(value) == "RaycastResult".

RBXScriptConnection​

t.RBXScriptConnection(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a RBXScriptConnection.

string?--

"RBXScriptConnection expected, got <actual>" on failure.

)

Passes when typeof(value) == "RBXScriptConnection".

RBXScriptSignal​

t.RBXScriptSignal(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a RBXScriptSignal.

string?--

"RBXScriptSignal expected, got <actual>" on failure.

)

Passes when typeof(value) == "RBXScriptSignal".

Rect​

t.Rect(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Rect.

string?--

"Rect expected, got <actual>" on failure.

)

Passes when typeof(value) == "Rect".

Region3​

t.Region3(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Region3.

string?--

"Region3 expected, got <actual>" on failure.

)

Passes when typeof(value) == "Region3".

Region3int16​

t.Region3int16(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Region3int16.

string?--

"Region3int16 expected, got <actual>" on failure.

)

Passes when typeof(value) == "Region3int16".

TweenInfo​

t.TweenInfo(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a TweenInfo.

string?--

"TweenInfo expected, got <actual>" on failure.

)

Passes when typeof(value) == "TweenInfo".

UDim​

t.UDim(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a UDim.

string?--

"UDim expected, got <actual>" on failure.

)

Passes when typeof(value) == "UDim".

UDim2​

t.UDim2(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a UDim2.

string?--

"UDim2 expected, got <actual>" on failure.

)

Passes when typeof(value) == "UDim2".

Vector2​

t.Vector2(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Vector2.

string?--

"Vector2 expected, got <actual>" on failure.

)

Passes when typeof(value) == "Vector2".

Vector2int16​

t.Vector2int16(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Vector2int16.

string?--

"Vector2int16 expected, got <actual>" on failure.

)

Passes when typeof(value) == "Vector2int16".

Vector3​

t.Vector3(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Vector3.

string?--

"Vector3 expected, got <actual>" on failure.

)

Passes when typeof(value) == "Vector3" (the same as t.vector).

Vector3int16​

t.Vector3int16(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a Vector3int16.

string?--

"Vector3int16 expected, got <actual>" on failure.

)

Passes when typeof(value) == "Vector3int16".

literalList​

t.literalList(
literals: {any}--

The allowed values.

) → Check--

Passes when the value equals one of the literals.

Returns a check that passes when the value is equal (==) to any entry of the literals array. Same as t.literal with several arguments, but takes a table, which is convenient when the allowed values already live in a list. The failure message is the generic "bad type for literal list".

local isDirection = t.literalList({ "North", "East", "South", "West" })

literal​

t.literal(
...: any--

One or more values the checked value may equal.

) → Check--

Passes when the value equals one of the literals.

Returns a check for one or more exact values. With a single argument the check passes only when value == literal and fails with "expected <literal>, got <value>". With several arguments it returns a t.unionList of one-literal checks (so the message becomes "bad type for union"). Deprecated alias: t.exactly.

local isTrue = t.literal(true)
local isTeam = t.literal("Red", "Blue")
print(isTeam("Green")) --> false, "bad type for union"

keyOf​

t.keyOf(
keyTable: {[any]: any}--

The table whose keys are the allowed values.

) → Check--

Passes when the value equals one of the keys.

Returns a check that passes when the value is one of the keys of keyTable, built as t.literal(key1, key2, ...). Handy for validating an option name against a dictionary of handlers. The key set is captured when keyOf is called; later changes to the table are not seen.

local handlers = { Jump = jump, Crouch = crouch }
local isAction = t.keyOf(handlers)
print(isAction("Jump"))  --> true
print(isAction("Fly"))   --> false

valueOf​

t.valueOf(
valueTable: {[any]: any}--

The table whose values are the allowed values.

) → Check--

Passes when the value equals one of the table's values.

Returns a check that passes when the value is one of the values of valueTable, built as t.literal(value1, value2, ...). Useful with enum-like tables of constants. The value set is captured when valueOf is called.

local Rarity = { Common = 1, Rare = 2, Epic = 3 }
local isRarity = t.valueOf(Rarity)
print(isRarity(2)) --> true

integer​

t.integer(
value: any--

The value to check.

) → (
boolean,--

Whether the value is an integer.

string?--

The failure message.

)

Passes when the value is a non-NaN number with no fractional part (value % 1 == 0). math.huge passes; 1.5 fails with "integer expected, got 1.5".

numberMin​

t.numberMin(
min: number--

The smallest accepted value.

) → Check--

Fails with "number >= <min> expected, got <value>".

Returns a check that passes for numbers where value >= min (inclusive). Non-numbers and NaN fail with the t.number message.

local isNonNegative = t.numberMin(0)

numberMax​

t.numberMax(
max: number--

The largest accepted value.

) → Check--

Fails with "number <= <max> expected, got <value>".

Returns a check that passes for numbers where value <= max (inclusive).

numberMinExclusive​

t.numberMinExclusive(
min: number--

The bound; the value itself is not accepted.

) → Check--

Fails with "number > <min> expected, got <value>".

Returns a check that passes for numbers where value > min (exclusive).

numberMaxExclusive​

t.numberMaxExclusive(
max: number--

The bound; the value itself is not accepted.

) → Check--

Fails with "number < <max> expected, got <value>".

Returns a check that passes for numbers where value < max (exclusive).

numberPositive​

t.numberPositive(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a number > 0.

string?--

The failure message.

)

Passes for numbers strictly greater than zero; equivalent to t.numberMinExclusive(0). Zero fails. This is a ready-made check, not a constructor: call it with the value directly.

numberNegative​

t.numberNegative(
value: any--

The value to check.

) → (
boolean,--

Whether the value is a number < 0.

string?--

The failure message.

)

Passes for numbers strictly less than zero; equivalent to t.numberMaxExclusive(0). Zero fails. This is a ready-made check, not a constructor: call it with the value directly.

numberConstrained​

t.numberConstrained(
min: number,--

The smallest accepted value.

max: number--

The largest accepted value.

) → Check--

Fails with the t.numberMin or t.numberMax message.

Returns a check that passes for numbers where min <= value <= max (both inclusive).

local isPercent = t.numberConstrained(0, 100)

Errors

TypeDescription
stringIf `min` or `max` is not a number (asserted when the check is built).

numberConstrainedExclusive​

t.numberConstrainedExclusive(
min: number,--

The lower bound, not accepted itself.

max: number--

The upper bound, not accepted itself.

) → Check--

Fails with the t.numberMinExclusive or t.numberMaxExclusive message.

Returns a check that passes for numbers where min < value < max (both exclusive).

Errors

TypeDescription
stringIf `min` or `max` is not a number (asserted when the check is built).

match​

t.match(
pattern: string--

A Lua pattern.

) → Check--

Fails with "<value> failed to match pattern <pattern>".

Returns a check that passes for strings matching a Lua string pattern (string.match). Non-strings fail with the t.string message. Anchor the pattern (^...$) if the whole string must match.

local isHexColor = t.match("^#%x%x%x%x%x%x$")
print(isHexColor("#ff8800")) --> true

Errors

TypeDescription
stringIf `pattern` is not a string (asserted when the check is built).

optional​

t.optional(
check: Check--

The check to apply when the value is not nil.

) → Check--

Passes for nil or any value accepted by check.

Returns a check that passes when the value is nil or passes check. This is how you mark interface fields and tuple positions as optional. Failure messages are prefixed with "(optional) ".

local IsConfig = t.interface({
	Name = t.string,
	Speed = t.optional(t.number), -- may be omitted
})

Errors

TypeDescription
stringIf `check` is not a function (asserted when the check is built).

tuple​

t.tuple(
...: Check--

One check per positional argument.

) → (...any) → (
boolean,
string?
)--

A check that takes the arguments as varargs.

Returns a check for an argument list rather than a single value. The returned function takes any number of arguments and checks the i-th argument against the i-th check. Extra arguments beyond the checks are ignored; missing arguments are checked as nil, so wrap a check in t.optional to allow it to be absent. Failures report the index: "Bad tuple index #2:\n\t<message>".

local checkArgs = t.tuple(t.instanceIsA("Player"), t.string, t.optional(t.number))

local function giveItem(player, itemName, amount)
	assert(checkArgs(player, itemName, amount))
end

keys​

t.keys(
check: Check--

Applied to each key.

) → Check--

Passes for tables whose keys all satisfy check (including empty tables).

Returns a check that passes when the value is a table and every key passes check. Values are not inspected. Failures read "bad key <key>:\n\t<message>".

Errors

TypeDescription
stringIf `check` is not a function (asserted when the check is built).

values​

t.values(
check: Check--

Applied to each value.

) → Check--

Passes for tables whose values all satisfy check (including empty tables).

Returns a check that passes when the value is a table and every value passes check. Keys are not inspected. Failures read "bad value for key <key>:\n\t<message>".

Errors

TypeDescription
stringIf `check` is not a function (asserted when the check is built).

map​

t.map(
keyCheck: Check,--

Applied to each key.

valueCheck: Check--

Applied to each value.

) → Check--

Passes for tables whose entries all satisfy both checks.

Returns a check for dictionaries: the value must be a table, every key must pass keyCheck and every value must pass valueCheck. Equivalent to t.keys followed by t.values. Empty tables pass.

local isScoreboard = t.map(t.instanceIsA("Player"), t.integer)

Errors

TypeDescription
stringIf either argument is not a function (asserted when the check is built).

set​

t.set(
valueCheck: Check--

Applied to each key of the set.

) → Check--

Passes for tables whose keys satisfy valueCheck and whose values are all true.

Returns a check for set-like tables of the form { [item] = true }: every key must pass valueCheck and every value must be exactly true. Equivalent to t.map(valueCheck, t.literal(true)).

local isNameSet = t.set(t.string)
print(isNameSet({ Alice = true, Bob = true })) --> true

array​

t.array(
check: Check--

Applied to each element.

) → Check--

Passes for sequential arrays whose elements all satisfy check.

Returns a check for proper arrays: the value must be a table whose keys are exactly 1..n with no gaps (sparse or mixed tables fail with "[array] key <k> must be sequential") and whose every element passes check. Empty tables pass.

local isPath = t.array(t.Vector3)
print(isPath({ Vector3.zero, Vector3.one })) --> true
print(isPath({ [1] = Vector3.zero, [3] = Vector3.one })) --> false

Errors

TypeDescription
stringIf `check` is not a function (asserted when the check is built).

strictArray​

t.strictArray(
...: Check--

One check per array index.

) → Check--

Passes for arrays that match the checks position by position.

Returns a check for a fixed-length, positionally typed array (a tuple stored in a table). The value must be a sequential array with at most as many elements as there are checks, and element i must pass check i. Missing trailing elements are checked as nil, so use t.optional to allow them.

local isPair = t.strictArray(t.string, t.number)
print(isPair({ "Coins", 10 }))        --> true
print(isPair({ "Coins", 10, true }))  --> false, "[strictArray] Array size exceeds limit of 2"

Errors

TypeDescription
stringIf any argument is not a function (asserted when the check is built).

unionList​

t.unionList(
checks: {Check}--

The alternatives.

) → Check--

Passes when at least one alternative passes.

Returns a check that passes when any check in the checks array passes (a union / "or"). Checks are tried in order and the first success wins. The failure message is the generic "bad type for union". t.union is the vararg form.

Errors

TypeDescription
stringIf `checks` is not an array of functions (asserted when the check is built).

union​

t.union(
...: Check--

The alternatives.

) → Check--

Passes when at least one alternative passes; fails with "bad type for union".

Returns a check that passes when any of the given checks passes (a union / "or"). Alias: t.some. Same as t.unionList({ ... }).

local isIdentifier = t.union(t.string, t.number)
local isPartOrModel = t.union(t.instanceIsA("BasePart"), t.instanceIsA("Model"))

some​

t.some(
...: Check--

The alternatives.

) → Check--

Passes when at least one alternative passes.

Alias of t.union.

intersectionList​

t.intersectionList(
checks: {Check}--

The checks that must all pass.

) → Check--

Passes when every check passes.

Returns a check that passes only when every check in the checks array passes (an intersection / "and"). Checks run in order and the first failure's message is returned. t.intersection is the vararg form.

Errors

TypeDescription
stringIf `checks` is not an array of functions (asserted when the check is built).

intersection​

t.intersection(
...: Check--

The checks that must all pass.

) → Check--

Passes when every check passes; fails with the first failing check's message.

Returns a check that passes only when every given check passes (an intersection / "and"). Alias: t.every. Same as t.intersectionList({ ... }). Useful for adding a constraint to an existing check.

local isEvenInteger = t.intersection(t.integer, function(n)
	return n % 2 == 0, "even number expected"
end)

every​

t.every(
...: Check--

The checks that must all pass.

) → Check--

Passes when every check passes.

Alias of t.intersection.

interface​

t.interface(
checkTable: {[any]: Check}--

Field name to check for that field.

) → Check--

Passes for tables whose listed fields all satisfy their checks.

Returns a check for objects (dictionaries with known field names). The value must be a table and, for each key = check pair in checkTable, value[key] must pass check. Fields not listed in checkTable are allowed and ignored; use t.strictInterface to forbid them. Wrap a field's check in t.optional to make the field optional. Failures read "[interface] bad value for <key>:\n\t<message>".

local IsItem = t.interface({
	Id = t.string,
	Price = t.numberMin(0),
	Tags = t.optional(t.array(t.string)),
})

print(IsItem({ Id = "sword", Price = 50, Extra = true })) --> true (Extra is ignored)

Errors

TypeDescription
stringIf `checkTable` is not a table of functions (asserted when the check is built).

strictInterface​

t.strictInterface(
checkTable: {[any]: Check}--

Field name to check for that field.

) → Check--

Passes for tables with exactly the listed fields, each satisfying its check.

Like t.interface, but additionally fails if the value contains any key not present in checkTable, with the message "[interface] unexpected field <key>". Use it for data that crosses a trust boundary (remotes, saved data) where unknown fields should be rejected.

local IsMove = t.strictInterface({ X = t.number, Y = t.number })
print(IsMove({ X = 1, Y = 2, Z = 3 })) --> false, '[interface] unexpected field "Z"'

Errors

TypeDescription
stringIf `checkTable` is not a table of functions (asserted when the check is built).

instanceOf​

t.instanceOf(
className: string,--

The exact ClassName required.

childTable: {[string]: Check}?--

Optional child-name to check table, as for t.children.

) → Check--

Fails with "<className> expected, got <actual ClassName>" or a t.children message.

Returns a check that passes when the value is an Instance whose ClassName is exactly className (no inheritance; a MeshPart is not a "Part"). Use t.instanceIsA for an IsA comparison. If childTable is given, the instance's children are also checked with t.children. Alias: t.instance.

local isCrate = t.instanceOf("Part", {
	Lid = t.instanceIsA("BasePart"),
	Prompt = t.optional(t.instanceOf("ProximityPrompt")),
})

Errors

TypeDescription
stringIf `className` is not a string (asserted when the check is built).

instance​

t.instance(
className: string,--

The exact ClassName required.

childTable: {[string]: Check}?--

Optional child-name to check table.

) → Check--

Passes for instances of exactly that class.

Alias of t.instanceOf.

instanceIsA​

t.instanceIsA(
className: string,--

The class (or superclass) name passed to IsA.

childTable: {[string]: Check}?--

Optional child-name to check table, as for t.children.

) → Check--

Fails with "<className> expected, got <actual ClassName>" or a t.children message.

Returns a check that passes when the value is an Instance for which value:IsA(className) is true, so subclasses are accepted ("BasePart" matches Part, MeshPart, WedgePart...). This is usually what you want for instance arguments. If childTable is given, the instance's children are also checked with t.children.

local checkArgs = t.tuple(t.instanceIsA("Player"), t.instanceIsA("Tool"))

Errors

TypeDescription
stringIf `className` is not a string (asserted when the check is built).

enum​

t.enum(
enum: Enum--

The enum type, e.g. Enum.Material.

) → Check--

Passes for items of that enum.

Returns a check that passes when the value is an EnumItem belonging to the given enum (value.EnumType == enum). Items of other enums fail with "enum of <enum> expected, got enum of <other>"; non-EnumItems fail with the t.EnumItem message.

local isMaterial = t.enum(Enum.Material)
print(isMaterial(Enum.Material.Wood))   --> true
print(isMaterial(Enum.KeyCode.A))       --> false

Errors

TypeDescription
stringIf `enum` is not an `Enum` (asserted when the check is built).

wrap​

t.wrap(
callback: (A...) → R...,--

The function to guard.

checkArgs: (A...) → (
boolean,
string?
)--

A check for the whole argument list, usually from t.tuple.

) → (A...) → R...--

A function that asserts the arguments and then calls callback.

Returns a new function that first runs assert(checkArgs(...)) on its arguments and then calls callback(...), returning whatever callback returns. checkArgs is normally a t.tuple. This is a convenient way to publish a guarded version of a function without editing its body.

local function setHealth(humanoid, health)
	humanoid.Health = health
end

setHealth = t.wrap(setHealth, t.tuple(t.instanceIsA("Humanoid"), t.numberMin(0)))
setHealth(workspace.Dummy.Humanoid, -5) -- errors: "Bad tuple index #2: ..."

Errors

TypeDescription
stringIf either argument is not a function (asserted when `wrap` is called), or, from the returned function, the message of a failed check.

strict​

t.strict(
check: (...any) → (
boolean,
string?
)--

Any check, including a t.tuple check.

) → (...any) → ()--

A function that raises the check's message if the check fails.

Turns a check into an assertion: the returned function calls assert(check(...)), so it errors with the check's message on failure and returns nothing on success. Use it at the top of functions or when validating data where a boolean result is not useful.

local assertConfig = t.strict(t.interface({ Speed = t.number }))
assertConfig({ Speed = "fast" }) -- error: [interface] bad value for Speed: number expected, got string

Errors

TypeDescription
stringFrom the returned function, the message of the failed check.

children​

t.children(
checkTable: {[string]: Check}--

Child name to the check for that child.

) → Check--

Fails with "[<FullName>.<child>] <message>" when a child does not satisfy its check.

Returns a check for an instance's child tree. The value must be an Instance; for each name = check pair in checkTable, the child called name (or nil if there is none) is passed to check. Wrap a check in t.optional to allow a child to be missing, and use t.instanceOf / t.instanceIsA with their own childTable to nest deeper. Children whose names are not in checkTable are ignored.

CAUTION

If the instance has two or more children sharing a name that appears in checkTable, the check fails with "Cannot process multiple children with the same name", even if one of them would have passed.

local isCharacter = t.children({
	Humanoid = t.instanceOf("Humanoid"),
	HumanoidRootPart = t.instanceIsA("BasePart"),
	Head = t.instanceIsA("BasePart"),
})
print(isCharacter(player.Character))

Errors

TypeDescription
stringIf `checkTable` is not a string-keyed table of functions (asserted when the check is built).

exactly​

deprecated in v1.0.0
</>
This was deprecated in v1.0.0
Use [t.literal] instead.
t.exactly(
...: any--

One or more values the checked value may equal.

) → Check--

Passes when the value equals one of the literals.

Old name for t.literal; behaves identically.

Show raw api
{
    "functions": [
        {
            "name": "type",
            "desc": "Returns a check that passes when Lua's `type(value)` equals `typeName`. Prefer [t.typeof] for\nanything but the raw Lua categories, because `type` reports every Roblox data type as\n`\"userdata\"` (and `Vector3` as `\"vector\"`).\n\n```lua\nlocal isUserdata = t.type(\"userdata\")\nprint(isUserdata(CFrame.new())) --> true\n```",
            "params": [
                {
                    "name": "typeName",
                    "desc": "The name `type()` must return, e.g. `\"userdata\"`, `\"vector\"`, `\"string\"`.",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"<typeName> expected, got <actual>\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 102,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "typeof",
            "desc": "Returns a check that passes when Roblox's `typeof(value)` equals `typeName`. This is how all\nthe built-in type checks (`t.string`, `t.Vector3`, `t.Instance`, ...) are made, so you only\nneed it for a type that has no ready-made check.\n\n```lua\nlocal isSharedTable = t.typeof(\"SharedTable\")\n```",
            "params": [
                {
                    "name": "typeName",
                    "desc": "The name `typeof()` must return, e.g. `\"Vector3\"`, `\"Instance\"`, `\"EnumItem\"`.",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"<typeName> expected, got <actual>\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 127,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "any",
            "desc": "Passes for every value except `nil`. Use it for interface fields that must be present but may\nhold anything.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "`true` unless `value` is `nil`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"any expected, got nil\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 155,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "boolean",
            "desc": "Passes when `typeof(value) == \"boolean\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 181,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "buffer",
            "desc": "Passes when the value is a Luau `buffer`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 199,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "thread",
            "desc": "Passes when the value is a coroutine (`thread`).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 217,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "callback",
            "desc": "Passes when the value is a function. Also available as `t[\"function\"]`. Every check constructor in `t` uses this internally to assert that the checks it receives are functions.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 235,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "none",
            "desc": "Passes only for `nil`. Also available as `t[\"nil\"]`. Useful inside [t.union] or [t.tuple] when a position must be empty.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 254,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "string",
            "desc": "Passes when the value is a string.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 273,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "table",
            "desc": "Passes when the value is a table (any table, including arrays and objects with metatables). Use [t.array], [t.map], [t.set] or [t.interface] to check the contents as well.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 291,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "userdata",
            "desc": "Passes when Lua's `type(value)` is `\"userdata\"`, which is true for almost every Roblox data type (`CFrame`, `Instance`, `Color3`, ...) but not for `Vector3`, which is a native `vector`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 309,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "vector",
            "desc": "Passes when Lua's `type(value)` is `\"vector\"`, i.e. the value is a `Vector3` (Luau stores `Vector3` as a native vector). Equivalent in practice to `t.Vector3`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value has the expected type.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"<type> expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 327,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "number",
            "desc": "Passes when the value is a number **and is not NaN**. Every numeric check in `t`\n([t.integer], [t.numberMin], [t.numberConstrained], ...) is built on this, so NaN never\nslips through them either. Use [t.nan] if you specifically want to accept NaN.\n\n```lua\nprint(t.number(1.5))  --> true\nprint(t.number(0/0))  --> false, \"unexpected NaN value\"\nprint(t.number(\"1\"))  --> false, \"number expected, got string\"\n```",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "`true` for any non-NaN number.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"number expected, got <type>\"` or `\"unexpected NaN value\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 353,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "nan",
            "desc": "Passes only when the value is a number that is NaN (`value ~= value`). Non-numbers fail with\na type message; ordinary numbers fail with `\"unexpected non-NaN value\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "`true` only for NaN.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "The failure message.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 383,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Axes",
            "desc": "Passes when `typeof(value) == \"Axes\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Axes`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Axes expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 414,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "BrickColor",
            "desc": "Passes when `typeof(value) == \"BrickColor\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `BrickColor`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"BrickColor expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 432,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "CatalogSearchParams",
            "desc": "Passes when `typeof(value) == \"CatalogSearchParams\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `CatalogSearchParams`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"CatalogSearchParams expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 450,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "CFrame",
            "desc": "Passes when `typeof(value) == \"CFrame\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `CFrame`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"CFrame expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 468,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Content",
            "desc": "Passes when `typeof(value) == \"Content\"` (the `Content` data type used by asset properties).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Content`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Content expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 486,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Color3",
            "desc": "Passes when `typeof(value) == \"Color3\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Color3`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Color3 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 504,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "ColorSequence",
            "desc": "Passes when `typeof(value) == \"ColorSequence\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `ColorSequence`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"ColorSequence expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 522,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "ColorSequenceKeypoint",
            "desc": "Passes when `typeof(value) == \"ColorSequenceKeypoint\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `ColorSequenceKeypoint`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"ColorSequenceKeypoint expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 540,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "DateTime",
            "desc": "Passes when `typeof(value) == \"DateTime\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `DateTime`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"DateTime expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 558,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "DockWidgetPluginGuiInfo",
            "desc": "Passes when `typeof(value) == \"DockWidgetPluginGuiInfo\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `DockWidgetPluginGuiInfo`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"DockWidgetPluginGuiInfo expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 576,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Enum",
            "desc": "Passes when `typeof(value) == \"Enum\"` (the enum *type*, e.g. `Enum.Material`, not one of its items; see [t.EnumItem] and [t.enum]).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Enum`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Enum expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 594,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "EnumItem",
            "desc": "Passes when `typeof(value) == \"EnumItem\"` (an item such as `Enum.Material.Plastic`; use [t.enum] to also require a specific enum).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `EnumItem`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"EnumItem expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 612,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Enums",
            "desc": "Passes when `typeof(value) == \"Enums\"` (the global `Enum` table itself).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Enums`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Enums expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 630,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Faces",
            "desc": "Passes when `typeof(value) == \"Faces\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Faces`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Faces expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 648,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "FloatCurveKey",
            "desc": "Passes when `typeof(value) == \"FloatCurveKey\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `FloatCurveKey`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"FloatCurveKey expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 666,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Font",
            "desc": "Passes when `typeof(value) == \"Font\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Font`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Font expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 684,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Instance",
            "desc": "Passes when `typeof(value) == \"Instance\"` (any `Instance`; use [t.instanceOf], [t.instanceIsA] or [t.children] to be more specific).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Instance`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Instance expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 702,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "NumberRange",
            "desc": "Passes when `typeof(value) == \"NumberRange\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `NumberRange`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"NumberRange expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 720,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "NumberSequence",
            "desc": "Passes when `typeof(value) == \"NumberSequence\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `NumberSequence`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"NumberSequence expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 738,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "NumberSequenceKeypoint",
            "desc": "Passes when `typeof(value) == \"NumberSequenceKeypoint\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `NumberSequenceKeypoint`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"NumberSequenceKeypoint expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 756,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "OverlapParams",
            "desc": "Passes when `typeof(value) == \"OverlapParams\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `OverlapParams`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"OverlapParams expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 774,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "PathWaypoint",
            "desc": "Passes when `typeof(value) == \"PathWaypoint\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `PathWaypoint`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"PathWaypoint expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 792,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "PhysicalProperties",
            "desc": "Passes when `typeof(value) == \"PhysicalProperties\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `PhysicalProperties`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"PhysicalProperties expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 810,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Random",
            "desc": "Passes when `typeof(value) == \"Random\"` (a `Random` object from `Random.new`).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Random`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Random expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 828,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Ray",
            "desc": "Passes when `typeof(value) == \"Ray\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Ray`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Ray expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 846,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "RaycastParams",
            "desc": "Passes when `typeof(value) == \"RaycastParams\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `RaycastParams`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"RaycastParams expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 864,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "RaycastResult",
            "desc": "Passes when `typeof(value) == \"RaycastResult\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `RaycastResult`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"RaycastResult expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 882,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "RBXScriptConnection",
            "desc": "Passes when `typeof(value) == \"RBXScriptConnection\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `RBXScriptConnection`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"RBXScriptConnection expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 900,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "RBXScriptSignal",
            "desc": "Passes when `typeof(value) == \"RBXScriptSignal\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `RBXScriptSignal`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"RBXScriptSignal expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 918,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Rect",
            "desc": "Passes when `typeof(value) == \"Rect\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Rect`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Rect expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 936,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Region3",
            "desc": "Passes when `typeof(value) == \"Region3\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Region3`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Region3 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 954,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Region3int16",
            "desc": "Passes when `typeof(value) == \"Region3int16\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Region3int16`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Region3int16 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 972,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "TweenInfo",
            "desc": "Passes when `typeof(value) == \"TweenInfo\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `TweenInfo`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"TweenInfo expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 990,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "UDim",
            "desc": "Passes when `typeof(value) == \"UDim\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `UDim`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"UDim expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1008,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "UDim2",
            "desc": "Passes when `typeof(value) == \"UDim2\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `UDim2`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"UDim2 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1026,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Vector2",
            "desc": "Passes when `typeof(value) == \"Vector2\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Vector2`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Vector2 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1044,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Vector2int16",
            "desc": "Passes when `typeof(value) == \"Vector2int16\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Vector2int16`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Vector2int16 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1062,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Vector3",
            "desc": "Passes when `typeof(value) == \"Vector3\"` (the same as `t.vector`).",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Vector3`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Vector3 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1080,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "Vector3int16",
            "desc": "Passes when `typeof(value) == \"Vector3int16\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a `Vector3int16`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "`\"Vector3int16 expected, got <actual>\"` on failure.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1098,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "literalList",
            "desc": "Returns a check that passes when the value is equal (`==`) to any entry of the `literals`\narray. Same as [t.literal] with several arguments, but takes a table, which is convenient\nwhen the allowed values already live in a list. The failure message is the generic\n`\"bad type for literal list\"`.\n\n```lua\nlocal isDirection = t.literalList({ \"North\", \"East\", \"South\", \"West\" })\n```",
            "params": [
                {
                    "name": "literals",
                    "desc": "The allowed values.",
                    "lua_type": "{ any }"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when the value equals one of the literals.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1122,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "literal",
            "desc": "Returns a check for one or more exact values. With a single argument the check passes only\nwhen `value == literal` and fails with `\"expected <literal>, got <value>\"`. With several\narguments it returns a [t.unionList] of one-literal checks (so the message becomes\n`\"bad type for union\"`). Deprecated alias: `t.exactly`.\n\n```lua\nlocal isTrue = t.literal(true)\nlocal isTeam = t.literal(\"Red\", \"Blue\")\nprint(isTeam(\"Green\")) --> false, \"bad type for union\"\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "One or more values the checked value may equal.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when the value equals one of the literals.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1166,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "exactly",
            "desc": "Old name for [t.literal]; behaves identically.",
            "params": [
                {
                    "name": "...",
                    "desc": "One or more values the checked value may equal.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when the value equals one of the literals.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "deprecated": {
                "version": "v1.0.0",
                "desc": "Use [t.literal] instead."
            },
            "source": {
                "line": 1201,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "keyOf",
            "desc": "Returns a check that passes when the value is one of the **keys** of `keyTable`, built as\n`t.literal(key1, key2, ...)`. Handy for validating an option name against a dictionary of\nhandlers. The key set is captured when `keyOf` is called; later changes to the table are not\nseen.\n\n```lua\nlocal handlers = { Jump = jump, Crouch = crouch }\nlocal isAction = t.keyOf(handlers)\nprint(isAction(\"Jump\"))  --> true\nprint(isAction(\"Fly\"))   --> false\n```",
            "params": [
                {
                    "name": "keyTable",
                    "desc": "The table whose keys are the allowed values.",
                    "lua_type": "{ [any]: any }"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when the value equals one of the keys.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1228,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "valueOf",
            "desc": "Returns a check that passes when the value is one of the **values** of `valueTable`, built as\n`t.literal(value1, value2, ...)`. Useful with enum-like tables of constants. The value set is\ncaptured when `valueOf` is called.\n\n```lua\nlocal Rarity = { Common = 1, Rare = 2, Epic = 3 }\nlocal isRarity = t.valueOf(Rarity)\nprint(isRarity(2)) --> true\n```",
            "params": [
                {
                    "name": "valueTable",
                    "desc": "The table whose values are the allowed values.",
                    "lua_type": "{ [any]: any }"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when the value equals one of the table's values.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1262,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "integer",
            "desc": "Passes when the value is a non-NaN number with no fractional part (`value % 1 == 0`).\n`math.huge` passes; `1.5` fails with `\"integer expected, got 1.5\"`.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is an integer.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "The failure message.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1290,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberMin",
            "desc": "Returns a check that passes for numbers where `value >= min` (inclusive). Non-numbers and NaN\nfail with the [t.number] message.\n\n```lua\nlocal isNonNegative = t.numberMin(0)\n```",
            "params": [
                {
                    "name": "min",
                    "desc": "The smallest accepted value.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"number >= <min> expected, got <value>\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1323,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberMax",
            "desc": "Returns a check that passes for numbers where `value <= max` (inclusive).",
            "params": [
                {
                    "name": "max",
                    "desc": "The largest accepted value.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"number <= <max> expected, got <value>\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1353,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberMinExclusive",
            "desc": "Returns a check that passes for numbers where `value > min` (exclusive).",
            "params": [
                {
                    "name": "min",
                    "desc": "The bound; the value itself is not accepted.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"number > <min> expected, got <value>\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1383,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberMaxExclusive",
            "desc": "Returns a check that passes for numbers where `value < max` (exclusive).",
            "params": [
                {
                    "name": "max",
                    "desc": "The bound; the value itself is not accepted.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"number < <max> expected, got <value>\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1413,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberPositive",
            "desc": "Passes for numbers strictly greater than zero; equivalent to `t.numberMinExclusive(0)`. Zero\nfails. This is a ready-made check, not a constructor: call it with the value directly.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a number `> 0`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "The failure message.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1443,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberNegative",
            "desc": "Passes for numbers strictly less than zero; equivalent to `t.numberMaxExclusive(0)`. Zero\nfails. This is a ready-made check, not a constructor: call it with the value directly.",
            "params": [
                {
                    "name": "value",
                    "desc": "The value to check.",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "Whether the value is a number `< 0`.",
                    "lua_type": "boolean"
                },
                {
                    "desc": "The failure message.",
                    "lua_type": "string?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1460,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberConstrained",
            "desc": "Returns a check that passes for numbers where `min <= value <= max` (both inclusive).\n\n```lua\nlocal isPercent = t.numberConstrained(0, 100)\n```",
            "params": [
                {
                    "name": "min",
                    "desc": "The smallest accepted value.",
                    "lua_type": "number"
                },
                {
                    "name": "max",
                    "desc": "The largest accepted value.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with the [t.numberMin] or [t.numberMax] message.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `min` or `max` is not a number (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1484,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "numberConstrainedExclusive",
            "desc": "Returns a check that passes for numbers where `min < value < max` (both exclusive).",
            "params": [
                {
                    "name": "min",
                    "desc": "The lower bound, not accepted itself.",
                    "lua_type": "number"
                },
                {
                    "name": "max",
                    "desc": "The upper bound, not accepted itself.",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with the [t.numberMinExclusive] or [t.numberMaxExclusive] message.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `min` or `max` is not a number (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1523,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "match",
            "desc": "Returns a check that passes for strings matching a Lua string pattern (`string.match`).\nNon-strings fail with the [t.string] message. Anchor the pattern (`^...$`) if the whole\nstring must match.\n\n```lua\nlocal isHexColor = t.match(\"^#%x%x%x%x%x%x$\")\nprint(isHexColor(\"#ff8800\")) --> true\n```",
            "params": [
                {
                    "name": "pattern",
                    "desc": "A Lua pattern.",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"<value> failed to match pattern <pattern>\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `pattern` is not a string (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1567,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "optional",
            "desc": "Returns a check that passes when the value is `nil` **or** passes `check`. This is how you\nmark interface fields and tuple positions as optional. Failure messages are prefixed with\n`\"(optional) \"`.\n\n```lua\nlocal IsConfig = t.interface({\n\tName = t.string,\n\tSpeed = t.optional(t.number), -- may be omitted\n})\n```",
            "params": [
                {
                    "name": "check",
                    "desc": "The check to apply when the value is not `nil`.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for `nil` or any value accepted by `check`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `check` is not a function (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1608,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "tuple",
            "desc": "Returns a check for an **argument list** rather than a single value. The returned function\ntakes any number of arguments and checks the i-th argument against the i-th check. Extra\narguments beyond the checks are ignored; missing arguments are checked as `nil`, so wrap a\ncheck in [t.optional] to allow it to be absent. Failures report the index:\n`\"Bad tuple index #2:\\n\\t<message>\"`.\n\n```lua\nlocal checkArgs = t.tuple(t.instanceIsA(\"Player\"), t.string, t.optional(t.number))\n\nlocal function giveItem(player, itemName, amount)\n\tassert(checkArgs(player, itemName, amount))\nend\n```",
            "params": [
                {
                    "name": "...",
                    "desc": "One check per positional argument.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "A check that takes the arguments as varargs.",
                    "lua_type": "(...any) -> (boolean, string?)"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1651,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "keys",
            "desc": "Returns a check that passes when the value is a table and **every key** passes `check`.\nValues are not inspected. Failures read `\"bad key <key>:\\n\\t<message>\"`.",
            "params": [
                {
                    "name": "check",
                    "desc": "Applied to each key.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for tables whose keys all satisfy `check` (including empty tables).",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `check` is not a function (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1683,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "values",
            "desc": "Returns a check that passes when the value is a table and **every value** passes `check`.\nKeys are not inspected. Failures read `\"bad value for key <key>:\\n\\t<message>\"`.",
            "params": [
                {
                    "name": "check",
                    "desc": "Applied to each value.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for tables whose values all satisfy `check` (including empty tables).",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `check` is not a function (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1719,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "map",
            "desc": "Returns a check for dictionaries: the value must be a table, every key must pass `keyCheck`\nand every value must pass `valueCheck`. Equivalent to [t.keys] followed by [t.values]. Empty\ntables pass.\n\n```lua\nlocal isScoreboard = t.map(t.instanceIsA(\"Player\"), t.integer)\n```",
            "params": [
                {
                    "name": "keyCheck",
                    "desc": "Applied to each key.",
                    "lua_type": "Check"
                },
                {
                    "name": "valueCheck",
                    "desc": "Applied to each value.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for tables whose entries all satisfy both checks.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If either argument is not a function (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1762,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "set",
            "desc": "Returns a check for set-like tables of the form `{ [item] = true }`: every key must pass\n`valueCheck` and every value must be exactly `true`. Equivalent to\n`t.map(valueCheck, t.literal(true))`.\n\n```lua\nlocal isNameSet = t.set(t.string)\nprint(isNameSet({ Alice = true, Bob = true })) --> true\n```",
            "params": [
                {
                    "name": "valueCheck",
                    "desc": "Applied to each key of the set.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for tables whose keys satisfy `valueCheck` and whose values are all `true`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1805,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "array",
            "desc": "Returns a check for proper arrays: the value must be a table whose keys are exactly\n`1..n` with no gaps (sparse or mixed tables fail with `\"[array] key <k> must be sequential\"`)\nand whose every element passes `check`. Empty tables pass.\n\n```lua\nlocal isPath = t.array(t.Vector3)\nprint(isPath({ Vector3.zero, Vector3.one })) --> true\nprint(isPath({ [1] = Vector3.zero, [3] = Vector3.one })) --> false\n```\n\n\t",
            "params": [
                {
                    "name": "check",
                    "desc": "Applied to each element.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for sequential arrays whose elements all satisfy `check`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `check` is not a function (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1835,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "strictArray",
            "desc": "Returns a check for a fixed-length, positionally typed array (a tuple stored in a table).\nThe value must be a sequential array with **at most** as many elements as there are checks,\nand element `i` must pass check `i`. Missing trailing elements are checked as `nil`, so use\n[t.optional] to allow them.\n\n```lua\nlocal isPair = t.strictArray(t.string, t.number)\nprint(isPair({ \"Coins\", 10 }))        --> true\nprint(isPair({ \"Coins\", 10, true }))  --> false, \"[strictArray] Array size exceeds limit of 2\"\n```\n\n\t",
            "params": [
                {
                    "name": "...",
                    "desc": "One check per array index.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for arrays that match the checks position by position.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If any argument is not a function (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1893,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "unionList",
            "desc": "Returns a check that passes when **any** check in the `checks` array passes (a union / \"or\").\nChecks are tried in order and the first success wins. The failure message is the generic\n`\"bad type for union\"`. [t.union] is the vararg form.\n\n\t",
            "params": [
                {
                    "name": "checks",
                    "desc": "The alternatives.",
                    "lua_type": "{ Check }"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when at least one alternative passes.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `checks` is not an array of functions (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 1940,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "union",
            "desc": "Returns a check that passes when **any** of the given checks passes (a union / \"or\"). Alias:\n`t.some`. Same as `t.unionList({ ... })`.\n\n```lua\nlocal isIdentifier = t.union(t.string, t.number)\nlocal isPartOrModel = t.union(t.instanceIsA(\"BasePart\"), t.instanceIsA(\"Model\"))\n```\n\n\t",
            "params": [
                {
                    "name": "...",
                    "desc": "The alternatives.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when at least one alternative passes; fails with `\"bad type for union\"`.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1975,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "some",
            "desc": "Alias of [t.union].\n\n\t",
            "params": [
                {
                    "name": "...",
                    "desc": "The alternatives.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when at least one alternative passes.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 1990,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "intersectionList",
            "desc": "Returns a check that passes only when **every** check in the `checks` array passes (an\nintersection / \"and\"). Checks run in order and the first failure's message is returned.\n[t.intersection] is the vararg form.\n\n\t",
            "params": [
                {
                    "name": "checks",
                    "desc": "The checks that must all pass.",
                    "lua_type": "{ Check }"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when every check passes.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `checks` is not an array of functions (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 2010,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "intersection",
            "desc": "Returns a check that passes only when **every** given check passes (an intersection /\n\"and\"). Alias: `t.every`. Same as `t.intersectionList({ ... })`. Useful for adding a\nconstraint to an existing check.\n\n```lua\nlocal isEvenInteger = t.intersection(t.integer, function(n)\n\treturn n % 2 == 0, \"even number expected\"\nend)\n```\n\n\t",
            "params": [
                {
                    "name": "...",
                    "desc": "The checks that must all pass.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when every check passes; fails with the first failing check's message.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 2048,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "every",
            "desc": "Alias of [t.intersection].\n\n\t",
            "params": [
                {
                    "name": "...",
                    "desc": "The checks that must all pass.",
                    "lua_type": "Check"
                }
            ],
            "returns": [
                {
                    "desc": "Passes when every check passes.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 2063,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "interface",
            "desc": "Returns a check for objects (dictionaries with known field names). The value must be a table\nand, for each `key = check` pair in `checkTable`, `value[key]` must pass `check`. Fields not\nlisted in `checkTable` are **allowed** and ignored; use [t.strictInterface] to forbid them.\nWrap a field's check in [t.optional] to make the field optional. Failures read\n`\"[interface] bad value for <key>:\\n\\t<message>\"`.\n\n```lua\nlocal IsItem = t.interface({\n\tId = t.string,\n\tPrice = t.numberMin(0),\n\tTags = t.optional(t.array(t.string)),\n})\n\nprint(IsItem({ Id = \"sword\", Price = 50, Extra = true })) --> true (Extra is ignored)\n```\n\n\t",
            "params": [
                {
                    "name": "checkTable",
                    "desc": "Field name to check for that field.",
                    "lua_type": "{ [any]: Check }"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for tables whose listed fields all satisfy their checks.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `checkTable` is not a table of functions (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 2098,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "strictInterface",
            "desc": "Like [t.interface], but additionally fails if the value contains **any key not present** in\n`checkTable`, with the message `\"[interface] unexpected field <key>\"`. Use it for data that\ncrosses a trust boundary (remotes, saved data) where unknown fields should be rejected.\n\n```lua\nlocal IsMove = t.strictInterface({ X = t.number, Y = t.number })\nprint(IsMove({ X = 1, Y = 2, Z = 3 })) --> false, '[interface] unexpected field \"Z\"'\n```\n\n\t",
            "params": [
                {
                    "name": "checkTable",
                    "desc": "Field name to check for that field.",
                    "lua_type": "{ [any]: Check }"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for tables with exactly the listed fields, each satisfying its check.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `checkTable` is not a table of functions (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 2140,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "instanceOf",
            "desc": "Returns a check that passes when the value is an `Instance` whose `ClassName` is **exactly**\n`className` (no inheritance; a `MeshPart` is not a `\"Part\"`). Use [t.instanceIsA] for an\n`IsA` comparison. If `childTable` is given, the instance's children are also checked with\n[t.children]. Alias: `t.instance`.\n\n```lua\nlocal isCrate = t.instanceOf(\"Part\", {\n\tLid = t.instanceIsA(\"BasePart\"),\n\tPrompt = t.optional(t.instanceOf(\"ProximityPrompt\")),\n})\n```",
            "params": [
                {
                    "name": "className",
                    "desc": "The exact `ClassName` required.",
                    "lua_type": "string"
                },
                {
                    "name": "childTable",
                    "desc": "Optional child-name to check table, as for [t.children].",
                    "lua_type": "{ [string]: Check }?"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"<className> expected, got <actual ClassName>\"` or a [t.children] message.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `className` is not a string (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 2193,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "instance",
            "desc": "Alias of [t.instanceOf].",
            "params": [
                {
                    "name": "className",
                    "desc": "The exact `ClassName` required.",
                    "lua_type": "string"
                },
                {
                    "name": "childTable",
                    "desc": "Optional child-name to check table.",
                    "lua_type": "{ [string]: Check }?"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for instances of exactly that class.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 2231,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "instanceIsA",
            "desc": "Returns a check that passes when the value is an `Instance` for which `value:IsA(className)`\nis true, so subclasses are accepted (`\"BasePart\"` matches `Part`, `MeshPart`, `WedgePart`...).\nThis is usually what you want for instance arguments. If `childTable` is given, the\ninstance's children are also checked with [t.children].\n\n```lua\nlocal checkArgs = t.tuple(t.instanceIsA(\"Player\"), t.instanceIsA(\"Tool\"))\n```",
            "params": [
                {
                    "name": "className",
                    "desc": "The class (or superclass) name passed to `IsA`.",
                    "lua_type": "string"
                },
                {
                    "name": "childTable",
                    "desc": "Optional child-name to check table, as for [t.children].",
                    "lua_type": "{ [string]: Check }?"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"<className> expected, got <actual ClassName>\"` or a [t.children] message.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `className` is not a string (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 2257,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "enum",
            "desc": "Returns a check that passes when the value is an `EnumItem` belonging to the given enum\n(`value.EnumType == enum`). Items of other enums fail with\n`\"enum of <enum> expected, got enum of <other>\"`; non-EnumItems fail with the [t.EnumItem]\nmessage.\n\n```lua\nlocal isMaterial = t.enum(Enum.Material)\nprint(isMaterial(Enum.Material.Wood))   --> true\nprint(isMaterial(Enum.KeyCode.A))       --> false\n```",
            "params": [
                {
                    "name": "enum",
                    "desc": "The enum type, e.g. `Enum.Material`.",
                    "lua_type": "Enum"
                }
            ],
            "returns": [
                {
                    "desc": "Passes for items of that enum.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `enum` is not an `Enum` (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 2311,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "wrap",
            "desc": "Returns a new function that first runs `assert(checkArgs(...))` on its arguments and then\ncalls `callback(...)`, returning whatever `callback` returns. `checkArgs` is normally a\n[t.tuple]. This is a convenient way to publish a guarded version of a function without\nediting its body.\n\n```lua\nlocal function setHealth(humanoid, health)\n\thumanoid.Health = health\nend\n\nsetHealth = t.wrap(setHealth, t.tuple(t.instanceIsA(\"Humanoid\"), t.numberMin(0)))\nsetHealth(workspace.Dummy.Humanoid, -5) -- errors: \"Bad tuple index #2: ...\"\n```\n\n\t",
            "params": [
                {
                    "name": "callback",
                    "desc": "The function to guard.",
                    "lua_type": "(A...) -> R..."
                },
                {
                    "name": "checkArgs",
                    "desc": "A check for the whole argument list, usually from [t.tuple].",
                    "lua_type": "(A...) -> (boolean, string?)"
                }
            ],
            "returns": [
                {
                    "desc": "A function that asserts the arguments and then calls `callback`.",
                    "lua_type": "(A...) -> R..."
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If either argument is not a function (asserted when `wrap` is called), or, from the returned function, the message of a failed check."
                }
            ],
            "source": {
                "line": 2360,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "strict",
            "desc": "Turns a check into an **assertion**: the returned function calls `assert(check(...))`, so it\nerrors with the check's message on failure and returns nothing on success. Use it at the top\nof functions or when validating data where a boolean result is not useful.\n\n```lua\nlocal assertConfig = t.strict(t.interface({ Speed = t.number }))\nassertConfig({ Speed = \"fast\" }) -- error: [interface] bad value for Speed: number expected, got string\n```",
            "params": [
                {
                    "name": "check",
                    "desc": "Any check, including a [t.tuple] check.",
                    "lua_type": "(...any) -> (boolean, string?)"
                }
            ],
            "returns": [
                {
                    "desc": "A function that raises the check's message if the check fails.",
                    "lua_type": "(...any) -> ()"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "From the returned function, the message of the failed check."
                }
            ],
            "source": {
                "line": 2392,
                "path": "packages/src/t/init.luau"
            }
        },
        {
            "name": "children",
            "desc": "Returns a check for an instance's **child tree**. The value must be an `Instance`; for each\n`name = check` pair in `checkTable`, the child called `name` (or `nil` if there is none) is\npassed to `check`. Wrap a check in [t.optional] to allow a child to be missing, and use\n[t.instanceOf] / [t.instanceIsA] with their own `childTable` to nest deeper. Children whose\nnames are not in `checkTable` are ignored.\n\n:::caution\nIf the instance has two or more children sharing a name that appears in `checkTable`, the\ncheck fails with `\"Cannot process multiple children with the same name\"`, even if one of\nthem would have passed.\n:::\n\n```lua\nlocal isCharacter = t.children({\n\tHumanoid = t.instanceOf(\"Humanoid\"),\n\tHumanoidRootPart = t.instanceIsA(\"BasePart\"),\n\tHead = t.instanceIsA(\"BasePart\"),\n})\nprint(isCharacter(player.Character))\n```\n\n\t",
            "params": [
                {
                    "name": "checkTable",
                    "desc": "Child name to the check for that child.",
                    "lua_type": "{ [string]: Check }"
                }
            ],
            "returns": [
                {
                    "desc": "Fails with `\"[<FullName>.<child>] <message>\"` when a child does not satisfy its check.",
                    "lua_type": "Check"
                }
            ],
            "function_type": "static",
            "errors": [
                {
                    "lua_type": "string",
                    "desc": "If `checkTable` is not a string-keyed table of functions (asserted when the check is built)."
                }
            ],
            "source": {
                "line": 2440,
                "path": "packages/src/t/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "Check",
            "desc": "A type check. Returns `true` if `value` is acceptable, otherwise `false` and a message that\ndescribes the problem. Every plain check in `t` has this signature and every check constructor\nreturns one, so checks can be nested freely (`t.array(t.optional(t.number))`).",
            "lua_type": "(value: any) -> (boolean, string?)",
            "source": {
                "line": 87,
                "path": "packages/src/t/init.luau"
            }
        }
    ],
    "name": "t",
    "desc": "`t` is a runtime type checker for Roblox Luau. It is a fork of\n[osyrisrblx/t](https://github.com/osyrisrblx/t) published as `kashtheking/t`, with the same\nAPI plus checks for newer Roblox types (`buffer`, `Content`, `Font`, `FloatCurveKey`, ...).\n\n## Checks\n\nEverything in `t` is built from **checks**. A check is a function with the signature\n`(value: any) -> (boolean, string?)`: it returns `true` when the value is acceptable, or\n`false` followed by a human-readable message explaining what was wrong. Members of `t` come\nin two flavours:\n\n- **Plain checks** that you call directly: `t.string`, `t.number`, `t.boolean`, `t.table`,\n  `t.Instance`, `t.Vector3`, `t.CFrame`, `t.any`, `t.integer`, `t.nan`, `t.numberPositive`, ...\n- **Check constructors** that take arguments and *return* a new check, so you compose them:\n  `t.optional(t.string)`, `t.array(t.number)`, `t.numberMin(0)`, `t.literal(\"a\", \"b\")`,\n  `t.interface({ ... })`, `t.tuple(...)`, `t.instanceIsA(\"BasePart\")`.\n\nBecause a failing check returns `false, message`, `assert(check(value))` raises that message\nas the error, which is the idiomatic way to guard arguments.\n\n```lua\nlocal t = require(path.to.t)\n\nlocal ok, err = t.number(5)   --> true\nok, err = t.number(\"5\")       --> false, \"number expected, got string\"\n\n-- Build checks once, at module level, and reuse them.\nlocal IsSaveData = t.interface({\n\tLevel = t.numberMin(1),\n\tCoins = t.integer,\n\tInventory = t.array(t.string),\n\tNickname = t.optional(t.string),\n\tTeam = t.literal(\"Red\", \"Blue\"),\n})\n\nlocal checkSave = t.tuple(t.instanceIsA(\"Player\"), IsSaveData)\n\nlocal function savePlayer(player, data)\n\tassert(checkSave(player, data))\n\t-- ...\nend\n\n-- Or let t generate the guard for you:\nlocal savePlayerStrict = t.wrap(savePlayer, checkSave)\nlocal assertSave = t.strict(checkSave) -- assertSave(player, data) errors on bad input\n```\n\n## Type checks\n\nThe plain type checks are created with [t.typeof] (or [t.type] for `userdata` and `vector`)\nand simply compare the value's type name. Lua primitives: `t.boolean`, `t.buffer`, `t.thread`,\n`t.callback` (alias `t[\"function\"]`), `t.none` (alias `t[\"nil\"]`), `t.string`, `t.table`,\n`t.userdata`, `t.vector`, plus [t.number] (which rejects NaN) and [t.nan]. Roblox data types:\n`t.Axes`, `t.BrickColor`, `t.CatalogSearchParams`, `t.CFrame`, `t.Content`, `t.Color3`,\n`t.ColorSequence`, `t.ColorSequenceKeypoint`, `t.DateTime`, `t.DockWidgetPluginGuiInfo`,\n`t.Enum`, `t.EnumItem`, `t.Enums`, `t.Faces`, `t.FloatCurveKey`, `t.Font`, `t.Instance`,\n`t.NumberRange`, `t.NumberSequence`, `t.NumberSequenceKeypoint`, `t.OverlapParams`,\n`t.PathWaypoint`, `t.PhysicalProperties`, `t.Random`, `t.Ray`, `t.RaycastParams`,\n`t.RaycastResult`, `t.RBXScriptConnection`, `t.RBXScriptSignal`, `t.Rect`, `t.Region3`,\n`t.Region3int16`, `t.TweenInfo`, `t.UDim`, `t.UDim2`, `t.Vector2`, `t.Vector2int16`,\n`t.Vector3`, `t.Vector3int16`. Each is also listed individually below.\n\n## Aliases\n\n`t.some` = [t.union], `t.every` = [t.intersection], `t.instance` = [t.instanceOf],\n`t[\"function\"]` = [t.callback], `t[\"nil\"]` = [t.none], and the deprecated `t.exactly` =\n[t.literal].\n\n**Credits:** `t` was created by **[Osyris](https://github.com/osyrisrblx)** ([osyrisrblx/t](https://github.com/osyrisrblx/t), MIT). This build is his library published to Wally as `kashtheking/t` with checks for newer Roblox data types added by KashTheKing.\n\nInstallation and guide: [t package page](/docs/packages/t).",
    "source": {
        "line": 78,
        "path": "packages/src/t/init.luau"
    }
}